I am trying to create an if statement that says "If box is checked then uncheck it, If box is unchecked then check it"
Here is my code
Code:
FAvar = Me.BillingInvoiceID
MsgBox "the Billing Invoice ID is " + FAvar
Dim qd As DAO.QueryDef
Dim rs As DAO.Recordset
If Me.CTB = False Then
Set qd = CurrentDb.QueryDefs("q_MarkCTB")
qd!Param1 = FAvar
qd.Execute dbFailOnError
Me.Requery
ElseIf Me.CTB = True Then
Set qd = CurrentDb.QueryDefs("q_UnMarkCTB")
qd!Param1 = FAvar
Me.Requery
End If
I have also tried it as a regular IF, not ElseIf, and the result is the same. The first one works but the second one does not.
Thanks