Results 1 to 5 of 5
  1. #1
    chaddresnick is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Dec 2014
    Location
    Dayton, Ohio
    Posts
    30

    Data Confirmation Screen on Form

    I have a form and I have created an event procedure on the "before update" property of the form. My procedure is:



    Private Sub Form_BeforeUpdate(Cancel As Integer)
    Dim pwd As String
    pwd = InputBox("Is the information you entered correct?")
    If pwd <> "yes" Then
    MsgBox "Record Not Saved"
    Me.Undo
    Else
    MsgBox "Record Saved"
    End If
    End Sub

    the record is not saving under any situation. What do I have wrong?

  2. #2
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,841
    you say the record is not saved under any situation - does that include closing the form or moving to another record?

    The record will not be saved until the beforeupdate event has completed, so technically, your 'record saved' message is incorrect - at that point, it has not been saved

  3. #3
    chaddresnick is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Dec 2014
    Location
    Dayton, Ohio
    Posts
    30
    So, how do I correct it?

  4. #4
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,841
    put the record save message in the form afterupdate event

  5. #5
    chaddresnick is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Dec 2014
    Location
    Dayton, Ohio
    Posts
    30
    Worked perfect! Thank you!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Confirmation by other person
    By herrgrek in forum Forms
    Replies: 3
    Last Post: 10-22-2013, 08:36 AM
  2. Replies: 1
    Last Post: 10-28-2012, 02:54 PM
  3. Replies: 11
    Last Post: 06-05-2011, 09:51 PM
  4. Confirmation on what I am doing
    By newtoAccess in forum Access
    Replies: 5
    Last Post: 12-10-2010, 01:01 PM
  5. Replies: 3
    Last Post: 11-16-2010, 10:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums