Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Posts
    81

    Unanswered: How to exit data entry mode?

    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?

    Bjorn

  2. #2
    Join Date
    Feb 2004
    Posts
    533
    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.
    Code:
    Private Sub cmdDataEntry_Click()
    If Me.DataEntry Then
       ' we don't want to save a partial record so lets Undo any entry
       Me.Undo
       ' Now turn off Dataentry Mode
       Me.DataEntry = False
       ' Here you may want to move to a specific record.
    Else
       Me.DataEntry = True
    End If
    
    End Sub
    ~

    Bill

  3. #3
    Join Date
    Jan 2003
    Posts
    81
    Thank you! That's exactly what I need.

    Bjorn

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •