Results 1 to 2 of 2
  1. #1
    dargo72 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Sep 2012
    Posts
    53

    Message Box

    I've created a "delete record" button on a form. I'd like a warning box to appear before the deletion, and require the individual to click "yes" or "no" to confirm the deletion.



    How do I do this?, and where exactly in the button's macro order do I stick this command?

    Thank you,

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    If you can use VBA code instead of a macro, here's my template code:

    Code:
    Dim msg As String, button As Variant, title As String, response As Variant
    msg = "Vehicle is Shopped - Do you want to dispatch anyway?"
    button = vbYesNo + vbDefaultButton2
    title = "Vehicle Shopped!"
    
    response = MsgBox(msg, button, title)
    If response = vbYes Then
       'what to do if yes
    Else
       'what to do if not
    End If
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 9
    Last Post: 09-26-2012, 12:20 PM
  2. Message Box
    By cbrsix in forum Programming
    Replies: 3
    Last Post: 06-08-2012, 01:44 PM
  3. Need Help with message box.
    By Grahamvdh in forum Programming
    Replies: 1
    Last Post: 05-10-2012, 01:29 PM
  4. Message Box
    By Alex Motilal in forum Forms
    Replies: 1
    Last Post: 03-27-2012, 08:31 AM
  5. message box help
    By shaz10010 in forum Forms
    Replies: 1
    Last Post: 04-17-2009, 09:11 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