P
Pat Hartman
To stop the automatic save, you need to trap the save in
the correct event. You need to use the form's
BeforeUpdate event, NOT the close event as was suggested
by another poster. The close event runs AFTER the record
is saved so it is too late to prevent the save.
In the BeforeUpdate event, add code something like:
If msgbox("do you want to save?",vbyesno) = vbyes
Else
Cancel = True
msgbox "Update was cancelled",vbokonly
End If
The - cancel = True - cancels the update event so that the
record is not saved.
Actions to that Component. They enter some data, and then
when the Form closes (even if they click "X" or the Close
button, because they didn't want to Save the Action after
all), Access saves the record anyway. Is there any way to
turn off the Autosave and just allow the user to save the
record by clicking a Save button which will then save the
record through a Macro? Please shed some light on this
for me. Thanks!
the correct event. You need to use the form's
BeforeUpdate event, NOT the close event as was suggested
by another poster. The close event runs AFTER the record
is saved so it is too late to prevent the save.
In the BeforeUpdate event, add code something like:
If msgbox("do you want to save?",vbyesno) = vbyes
Else
Cancel = True
msgbox "Update was cancelled",vbokonly
End If
The - cancel = True - cancels the update event so that the
record is not saved.
Component ID and they are allowed Associate existing-----Original Message-----
I'm creating a Form in Access in which users have a
Actions to that Component. They enter some data, and then
when the Form closes (even if they click "X" or the Close
button, because they didn't want to Save the Action after
all), Access saves the record anyway. Is there any way to
turn off the Autosave and just allow the user to save the
record by clicking a Save button which will then save the
record through a Macro? Please shed some light on this
for me. Thanks!