Need help making button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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?
 
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
 
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
 
Back
Top