click next to continue or click cancel to abort

Posted on 2009-07-13
Last Modified: 2013-11-28
I have the following code but i need to add a popup to warn the user these querries are about to run and if they wish to continue then click next / if they wish to abort click cancel:

   With DoCmd
        .SetWarnings False
        .OpenQuery "Scan_For_NEW_VGP_CN_Records"
        .OpenQuery "Scan_For_NEW_VGP_Records"
        .OpenQuery "Scan_For_NEW_VGP_TS_Records"
        .OpenQuery "UPDATE_Vessel_Sum_In_Process"
        .SetWarnings True
    End With

MsgBox "Update complete!"

Can someone please help me add this functionality to this code?

Question by:HudsonMarine
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 120

Accepted Solution

Rey Obrero (Capricorn1) earned 500 total points
ID: 24840726

dim msg as string
msg="Queries are about to run and update records." & vbcrlf
msg=msg & "Click Ok to continue or Cancel to abort."

If (msgbox(msg,vbokcancel))=vbok then
   With DoCmd
        .SetWarnings False
        .OpenQuery "Scan_For_NEW_VGP_CN_Records"
        .OpenQuery "Scan_For_NEW_VGP_Records"
        .OpenQuery "Scan_For_NEW_VGP_TS_Records"
        .OpenQuery "UPDATE_Vessel_Sum_In_Process"
        .SetWarnings True
    End With

MsgBox "Update complete!"
    msgbox "Update aborted"
end if


Author Closing Comment

ID: 31602863
Thanks Capricorn1 - Morning to ya!

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question