I have a form with 6 subforms in Access 2003 with two command buttons at the bottom of the form. When I add data into 2 of the forms and click "Exit with No Save" these two forms retain their data. However, one of the subforms is entirely comprised of Check boxes and when I open an existing record and click on any of the boxes the main form closes but retains the data of only the first one selected. The other subform has an attachment command button and always saves when clicked on "Exit with No Save". Maybe the reason is geared towards the entry screens in question being subforms. Any ideas?
Close Without Save
Collapse
X
-
This is all my close without save command button has in it:Originally posted by RabbitNaming a button Exit Without Save doesn't do anything unless you have code behind it. You'll need to either delete the record or undo the changes.
Why do you think it would be saving?Code:Private Sub cmdCloseNoSave_Click() DoCmd.Hourglass True Select Case MsgBox("You are about to close the form without saving your changes. Are you sure you want to do this?", vbExclamation + vbYesNo, "Close without Saving") Case vbYes Me.Undo Me.Dirty = False DoCmd.Close Case vbNo End Select DoCmd.Hourglass False End SubComment
Comment