Check Boxes

  • Thread starter Thread starter J
  • Start date Start date
J

J

I'm wondering what I would need to do in order to get a check box to
run a query if it's checked and run a separate one if it isn't checked.
I havn't used VBA in a while and I need some guidance on what to do.
 
Just use and If...Then...Else statement to do one or the other, depending on
the value of the checkbox (True or False). The default value of the checkbox
will be Null (lightly grayed out) unless you specify something different in
its DefaultValue property. This If statement will treat Null as False (i.e.
as not True).

Example:
If Me.chkMyCheckbox Then
CurrentDb.Execute "qryMyQuery", dbFailOnError
Else
CurrentDb.Execute "qryMyOtherQuery", dbFailOnError
End If
 
Back
Top