View Full Version : Subforms and Tables


omahonr
04-26-2001, 03:55 AM
I have a subform which is supported by an underlying table. This form is shown in the main form as a datasheet. In the main form if I click on one of the fields (populated or a new row) an empty row is added to the underlying table. This isn't a problem is I then proceed to add a new row but if I close the form an empty row is left in the table. Which is causing me problems. Is there any way to avoid this happening. p.s. I have no code in the On_Enter event so it's not that.

KevinM
04-26-2001, 07:35 AM
Are you sure that this 'empty row' is not just the row for a new record entry.

Liv Manto
04-26-2001, 08:29 PM
DataSheet Form always has an extra empty record. This signifies that it is an updatable table. You won't see this if your form is based on a complicated query like summed and group.

You can use the Continuous form designed to look like a datasheet, if you don't want to show the empty record.

omahonr
04-26-2001, 11:50 PM
No, it's not just the one empty row that is always there, this is another one that gets added when the user enters one of the fields on the datasheet

KevinM
04-27-2001, 12:32 AM
Have one of the fields as 'Required' (in table design) to prevent null entries in a record.

HTH