vba popup message

slimjen1

Registered User.
Local time
Today, 18:50
Joined
Jun 13, 2006
Messages
562
all using access 2010. Have a form with a control that upon click in the beforeupdate i would like a message to popup to give the user an opportunity to change the entry if isnt correct. I dont want to restrict just give them a message something like "make sure you're using the correct date" if not cancel and go back. How do I do this pls. Thanks
 
This type of thing.

Code:
Dim msg As String, button As Variant, title As String, response As Variant

      msg = "Advise management that vehicle is more than 1,000 miles overdue for service - Continue taking lease payment?"
      button = vbYesNo + vbDefaultButton2
      title = "Overdue Service!"

      response = MsgBox(msg, button, title)
      If response = vbYes Then
        'what to do if yes
      Else
        'what to do otherwise
      End If

Adding Cancel = True since you're using the before update event.
 
thanks so much. I had a brain fart:)
 
No problem. We all have those. :p
 

Users who are viewing this thread

Back
Top Bottom