Need help making button

J

jmuirman

I created a button on a form to run a query. However, when the query question
window pops up I put in the criteria and enter and then it pops up again -
How can I stop the double pop-up?

Thanks,

John
 
R

Rick B

Does the same thing happen when you run the query by itself, or only from
the button? Is there criteria in the code behind your button that does not
match the criteria in the actual query. For example...

=[Enter Date:]

in the query and

[EnterDate]

in the vba code?
 
J

jmuirman

Thanks,

John

Rick B said:
Does the same thing happen when you run the query by itself, or only from
the button? Is there criteria in the code behind your button that does not
match the criteria in the actual query. For example...

=[Enter Date:]

in the query and

[EnterDate]

in the vba code?



--
Rick B



jmuirman said:
I created a button on a form to run a query. However, when the query
question
window pops up I put in the criteria and enter and then it pops up again -
How can I stop the double pop-up?

Thanks,

John
 
J

jmuirman

The query runs fine with only one criteria pop-up. Thought I had it - but
it's doing it again - here's my vbc:

Err_Command101_Click:
MsgBox Err.Description
Resume Exit_Command101_Click

End Sub
Private Sub Command102_Click()
On Error GoTo Err_Command102_Click

Dim stDocName As String

stDocName = "qContacts - EMAIL BY TYPE"
DoCmd.OpenQuery stDocName, acNormal, acEdit

Exit_Command102_Click:
Exit Sub

Err_Command102_Click:
MsgBox Err.Description
Resume Exit_Command102_Click

End Sub

Thanks,

John
 

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