I have the following code on a close command button on a form:-
MsgBox "Do you want to save this information?", vbYesNo
If vbYes Then
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.Close
Else
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveNo, , acMenuVer70
DoCmd.Close
End If
The message box displayed gives the user the choice of saving any data added. My problem is that it doesnt matter which option the user chooses - Access saves the data! How do I get the NO option to work? Help??
[This message has been edited by jax (edited 04-29-2002).]
[This message has been edited by jax (edited 04-29-2002).]
MsgBox "Do you want to save this information?", vbYesNo
If vbYes Then
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.Close
Else
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveNo, , acMenuVer70
DoCmd.Close
End If
The message box displayed gives the user the choice of saving any data added. My problem is that it doesnt matter which option the user chooses - Access saves the data! How do I get the NO option to work? Help??
[This message has been edited by jax (edited 04-29-2002).]
[This message has been edited by jax (edited 04-29-2002).]