Full Version: Saving Record!
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
net_ad861
I noticed in MS Access after fill up all the fields in a form, the record is autosave, Is there a possible way to avoid this. I want to ask the user if he want to save the record or not.
R. Hicks
If the form does not contain a subform .. you could do this using the Before Update event of the form ....

RDH
Cruiserpilot
Like Ricky said if the form does not have a subform.

You could use the following

Place a Command button on the form and call it SaveCmdBtn
In the OnClick event of the this Command Button use the following in a Procedure

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70


In the OnClose Event of the Form use the folowing in a Procedure

DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
doCmd.Close


Regards,
Michael
R. Hicks
The "DoMenuItem" method is somewhat obsolete .. although it still works in the latest version of Access ...
It may not be supported in future versions ...
There are better methods and properties that can be used to do this task ...

RDH
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.