Earl C Phillips
Volunteer Programmer
- Local time
- Today, 08:28
- Joined
- Jul 18, 2008
- Messages
- 40
I have forms that are used to enter data to a table. After clicking on the "Add" button, it adds the record and clears the form. But, if user does not click on "Add" and instead clicks on "Return to Main", if anything is left on the form it writes a record containing whatever is left, in spite of a Me.Undo in the code.
Me.Undo
DoCmd.CancelEvent
'Close the Modify Participants page
strDocName = "frmModParticipants"
DoCmd.Close acForm, strDocName, acSaveYes
'open main form to start over
strDocName = "frmMain"
DoCmd.OpenForm strDocName, , , strLinkCriteria
How can I limit the write to the tables so only the "Add" button works?
Help the Community Food Bank feed the hungry.
Me.Undo
DoCmd.CancelEvent
'Close the Modify Participants page
strDocName = "frmModParticipants"
DoCmd.Close acForm, strDocName, acSaveYes
'open main form to start over
strDocName = "frmMain"
DoCmd.OpenForm strDocName, , , strLinkCriteria
How can I limit the write to the tables so only the "Add" button works?
Help the Community Food Bank feed the hungry.