Ok,
I have a form where a member can update a users information.
I don't want the updates to save unless a user presses the btnUpdateMemeber, or clicks Yes on the msgbox when clicking home(it ask if they want to save or not).
I pretty much have all the buttons and everything where they cancel any changes made... the problem I am having is when a person right clicks the tab and clicks close... This doesn't seem to run my code...
.... I am superconfused and have been workign this issue for a while.
What I have right now, is on each button ( there is a Home button, and a Edit Another member button) a msb box, that ask if they want to save... if yes then DoCmd.RunCommand acCmdSaveRecord ... if no, then me.Undo
I know there is a way to use Cancel = true and false and such, but I couldn't get that to work...
So can I please get some help... Anything to make this easier would be better as I need to do this to all my forms(about 20).
So, recap.... I need help with a method, to not update unless the user clicks update/or save/or yes on msgboxes(when asked to save). Also, I need it to not update when a user rightclicks and closes the form. .....
1 more thing, is there a way to disable the right click close? so that a user can't close by right clicking on the tab? that might help as well... .
I have a form where a member can update a users information.
I don't want the updates to save unless a user presses the btnUpdateMemeber, or clicks Yes on the msgbox when clicking home(it ask if they want to save or not).
I pretty much have all the buttons and everything where they cancel any changes made... the problem I am having is when a person right clicks the tab and clicks close... This doesn't seem to run my code...
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.Undo
End Sub
.... I am superconfused and have been workign this issue for a while.
What I have right now, is on each button ( there is a Home button, and a Edit Another member button) a msb box, that ask if they want to save... if yes then DoCmd.RunCommand acCmdSaveRecord ... if no, then me.Undo
I know there is a way to use Cancel = true and false and such, but I couldn't get that to work...
So can I please get some help... Anything to make this easier would be better as I need to do this to all my forms(about 20).
So, recap.... I need help with a method, to not update unless the user clicks update/or save/or yes on msgboxes(when asked to save). Also, I need it to not update when a user rightclicks and closes the form. .....
1 more thing, is there a way to disable the right click close? so that a user can't close by right clicking on the tab? that might help as well... .