Solved

click next to continue or click cancel to abort

Posted on 2009-07-13
2
293 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
2 Comments
 
LVL 119

Accepted Solution

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


0
 
LVL 1

Author Closing Comment

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

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

895 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now