Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2005
    Posts
    18

    Unanswered: Message box help!

    Hi Guys!

    I have a main form with 2 listboxes. Each listbox shows records from 2 seperate tables (via a query).

    I have a command button on a form (with a query behind it) which when clicked loads a second form, and takes the rows from each listbox which I have selected and saves them into a third table - creating a single table with information from the two other tables.

    My question is - I need a message box to appear when the command button is clicked to allow me to cancel or continue the event before anything is written to the third table. I want it to be a "Are you sure you want to continue" sort of message box - yes / no. I am unsure how to do this

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    if msgbox("your msg", vbokcancel, "title") = vbok then

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Feb 2004
    Posts
    533
    Quote Originally Posted by izyrider
    if msgbox("your msg", vbokcancel, "title") = vbok then

    izy
    right on izy, or a little more complicated

    retval = msgbox("your msg", vbYesNo+vbQuestion, "title")

    If Not retVal = vbYes then
    Exit Sub
    End If




    .
    ~

    Bill

Posting Permissions

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