msgboxYESNo

  • Thread starter Thread starter Guest
  • Start date Start date
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.......
 
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.
 
Back
Top