Running 2 queries at the same time using VB

  • Thread starter kft10 via AccessMonster.com
  • Start date
K

kft10 via AccessMonster.com

Hi,

I have 2 queries; 1 selected query and the other one for Append query. When I
click the button, I'd like to do Selected query first to give a chance for
user to check and print the result. After that, the system will run the
Append Query.

I already did the script like this:

Docmd.openquery "Selected Query', AcviewPreview
MsgBox "Are you sure to run this query", VbOkOnly
Docmd.openqury "Append Query", AcviewNormal

The problem is, I couldn't print the selected query. I have to click OK then
the VB will run the Append query. Is anyone know how to write the script in
VB to do what I want? Thank you in advance

Rgds,
KF
 
J

jl5000

Make this a 2 step process, you can use buttons on a form, the first button
runs
Docmd.openquery "Selected Query', AcviewPreview

The 2nd

if MsgBox ("Are you sure to run this query", VbOkOnly)= VbOKOnly then
Docmd.openqury "Append Query", AcviewNormal
end if
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top