Run A Query When A Checkbox Is Checked

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

Guest

I would like to run a query when a checkbox is checked but if I un-check the
box the query does not run.

Any help will be appreciated.

Regards
Nick
 
Nick,
Use the AfterUpdate event of the checkbox...
If YourChkBoxName = True the
'run query here
End if
 
Thanks for your help Al.
I used Private Sub D_AfterUpdate()
If D = True Then
run query qyCompleteContinuations
End If
End Sub
However I couldn't get it to work and I also tried
DoCmd.OpenQuery qyCompleteContinuations

I am obviously doing something basically wrong?
 
Nick,
However I couldn't get it to work...
I'm surprised you didn't get some error message. Always include any error messages
when posting...

You should be using...
DoCmd.OpenQuery "qyCompleteContinuations"
or...
DoCmd.RunSQL "....The SQL string of your qyCompleteContinuations here......"
 
Thanks again Al,
I actually didn’t get any error messages. The query just would not work but
now I have used “ “ around the query name it works fine.

Your help is appreciated
Nick
 

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

Back
Top