Solved

click next to continue or click cancel to abort

Posted on 2009-07-13
2
292 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

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…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 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

15 Experts available now in Live!

Get 1:1 Help Now