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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Closing for without saving.

Status
Not open for further replies.

chino123

Programmer
Sep 2, 2003
5
UY
Hi,
I have a form with a close button, and the thing is that when closing the form, data entered in the form is inserted into the corresponding table. What I need is to save the record only when the user presses a save button but not when closing the form. ¿Is this possible?

Thanks in advance.
 
Hi,

When you add a comand button, Access automatically takes you to a wizard. In there tell it that you want the button to save a record.

Regards,

Darrylle

"Never argue with an idiot, he'll bring you down to his level - then beat you with experience." darrylles@totalise.co.uk
 
Hello,

I think you need to put the following into an On Unload event for the form:

If Me.dirty then
Me.Undo
End if

HTH,
Bob

Please view Thread181-473997 for helpful hints regarding this site.
 
You're welcome!

My Access/VB knowledge is still a bit short. I really want to figure out how to assign my own name to a standard command.

Then, I could write:

If Me.Dirty then
Me.Wash
End If

Grins,
Bob

Please view Thread181-473997 for helpful hints regarding this site.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top