Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    300

    Question Unanswered: Basic Help - MsgBox

    This is a basic problem, as I am a basic[beginner] user.

    I am using Access 2000 and have a form that has a "delete" button, and if pressed the user deletes that record.

    I want to know, step by step, how to create a MsgBox that says:Are you sure? Click OK - and the record is deleted
    Click Cancel and the action is canceled and the user is returned to the form, unchanged.

    Thanks in advance.

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: Basic Help - MsgBox

    Originally posted by databasemon
    This is a basic problem, as I am a basic[beginner] user.

    I am using Access 2000 and have a form that has a "delete" button, and if pressed the user deletes that record.

    I want to know, step by step, how to create a MsgBox that says:Are you sure? Click OK - and the record is deleted
    Click Cancel and the action is canceled and the user is returned to the form, unchanged.

    Thanks in advance.
    Dim MsgResult as VBmsgboxresult

    MsgResult=MsgBox("Are you sure?",VBYesNoCancel,"Title Here")
    If MsgResult=VBYes then ' Do your delete
    endif

    This work for you?

  3. #3
    Join Date
    Nov 2003
    Posts
    300
    YES! Thank you!

Posting Permissions

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