Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

click next to continue or click cancel to abort

Posted on 2009-07-13
2
Medium Priority
?
316 Views
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?

Thanks
0
Comment
Question by:HudsonMarine
[X]
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
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 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!"
else
    msgbox "Update aborted"
end if


0
 
LVL 1

Author Closing Comment

by:HudsonMarine
ID: 31602863
Thanks Capricorn1 - Morning to ya!
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
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 …

604 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