Confirm Edit? Confirm Delete? (1 Viewer)

Cosmos75

Registered User.
Local time
Today, 04:27
Joined
Apr 22, 2002
Messages
1,281
I have a module called ConfirmEdit with a function called ConfirmEdit that asks the user if they want to accept the changes that they've made to a record.

PHP:
Public Sub ConfirmEdit()
On Error GoTo ConfirmEdit_Err

    If (MsgBox("Accept changesl? If NO, then click Cancel and 
    then ESC. Pressing EQC clears the changes made 
    and allows you to move to another record.", 1, "Are you sure?") = 2) Then
        DoCmd.CancelEvent
        ' Perform the action on this  line 
          if the condition on the preceding line is true
        SendKeys "{ESC}", False
    End If


ConfirmEdit_Exit:
    Exit Sub

ConfirmEdit_Err:
    MsgBox Error$
    Resume ConfirmEdit_Exit

End Sub

The thing is, I want to be able to check if the user is EDIT-ing or ADD-ing a new records and have the message change accordingly. I am stuch at that point.
:confused:

Any ideas?
 
Last edited:

chrismcbride

Registered User.
Local time
Today, 10:27
Joined
Sep 7, 2000
Messages
301
The NewRecord property of the form might work for you...

Chris
 

Users who are viewing this thread

Top Bottom