I want to display a certain record if a user decides to stop data entry in the middle of a form with many required fields. I capture error 3316 (missing a required field) and give the user an option to continue data entry or cancel, but how do I get out of data entry mode without closing and opening the form?
In this example I created a button 'cmdDataEntry' to toggle the data entry mode and Demo the code to turn off dataentry mode. Very simple Me.DataEntry = False, This will save any uncommited data entered so use Me.Undo if you want to abort any in progress data entry.
Private Sub cmdDataEntry_Click()
If Me.DataEntry Then
' we don't want to save a partial record so lets Undo any entry
' Now turn off Dataentry Mode
Me.DataEntry = False
' Here you may want to move to a specific record.
Me.DataEntry = True