msgboxYESNo

G

Guest

I have the following code. The YesNo messagebox is on top of the open querry.
My problem is: I want to check the querry before I decide on Yes or No.
In this code, the querry is displayed in part and I have to make a decsion
before I can review the transactions.
Is there any way I can review the transactions and then say YesNo?

Dim stDocName As String
stDocName = "qry xyz"
DoCmd.OpenQuery stDocName, acViewNormal, acEdit



Dim xmsg As String
xmsg = "example only...Press YES to process"
If MsgBox(xmsg, vbYesNo, " ") = vbYes Then

etc etc.......
 
D

Dirk Goldgar

mn said:
I have the following code. The YesNo messagebox is on top of the open
querry. My problem is: I want to check the querry before I decide on
Yes or No.
In this code, the querry is displayed in part and I have to make a
decsion before I can review the transactions.
Is there any way I can review the transactions and then say YesNo?

Dim stDocName As String
stDocName = "qry xyz"
DoCmd.OpenQuery stDocName, acViewNormal, acEdit



Dim xmsg As String
xmsg = "example only...Press YES to process"
If MsgBox(xmsg, vbYesNo, " ") = vbYes Then

etc etc.......

Here are a couple of options you might consider:

Option 1 -- use your own popup form to display your message and Yes/No
buttons.

Option 2 -- Display the query results on a continuous form with Yes/No
buttons in the header, or else on a subform with the buttons on the
parent form.

I favor the second one.
 

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