Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Closing a record without saving (2000)

    Is there a way to close a record without saving it? I want to give the user the option of saving a record before going to the next one or closing the form.

    Thanks,
    Leesha

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Closing a record without saving (2000)

    The instruction Me.Undo will undo changes to the current record. You could ask the user for confirmation in the BeforeUpdate event of the form:

    Private Sub Form_BeforeUpdate(Cancel As Integer)
    If MsgBox("Do you want to keep changes?", vbQuestion Or vbYesNo) = vbNo Then
    Me.Undo
    End If
    End Sub

  3. #3
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Closing a record without saving (2000)

    Gracias Hans!!!

    Leesha

Posting Permissions

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