Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record inserted into table when closing form 1

Status
Not open for further replies.

ba543

MIS
Jan 15, 2004
34
US
The problem is, whenever I close the form, another record gets inserted, with
mostly null values in its fields. This also happens when I go from form view
to design view. The "On Close" event for the form doesn't tell it to add
another record, so why is it doing it? Is there any way I can make it stop,
so I don't have all these extra records every time the form gets closed?

Any help would be greatly appreciated, thanks.
 
Guessing here...

I suspect you have some default values that are landing in your table. You can prevent that by using a command button to close the form. Within the code, include a Me.Undo.



HTH,
Bob [morning]
 
Another cause could be how you allow you form to deal with data. If for example your form is set to enter data as a property in the properties dialog, then on opening the form a new record in the underlying table is created. Even if you don't enter data on the form, the new record is there with the values that are set as standard in the design view for the table.

hth
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top