DoCmd.Close

dhunter

Registered User.
Local time
Today, 12:51
Joined
Jul 1, 2009
Messages
26
I have a form that updates records in a table.
I use an sql query to open a Recordset and I use Recordset.Update to update the fields in the table (when user presses the save btn).

I use a generic btn to close the form. When I use this btn it automatically saves a duplicate entry into the table. How can I prevent this?

I converted the btn to vb and tried to use a msg box to prmpt user if they want to save (update record) but I am not really sure what DoCmd.Close actually does. How can I close the form without it saving?

I am new at coding with Access so I apologize in advance.

Thanks
 
My guess would be that the form is bound to the table. In that event, there's no need for the code.
 

Users who are viewing this thread

Back
Top Bottom