Hey peeps,
I have added a check box in an access application, which when ticked and on pressing the submit button, it builds a query and displays the result. I am not sure what is the correct syntax in VBA, that would do the following:IF checkbox is ticked THAN do something, so in my case add an extra bit to the query. Here is my code below for the checkbox but it doesn't work. I suspect its the wrong syntax I am using:
If Me.Check16.Value = vbChecked is this correct? Can someone point me in the right direction.
Thanks,
Ket
I have added a check box in an access application, which when ticked and on pressing the submit button, it builds a query and displays the result. I am not sure what is the correct syntax in VBA, that would do the following:IF checkbox is ticked THAN do something, so in my case add an extra bit to the query. Here is my code below for the checkbox but it doesn't work. I suspect its the wrong syntax I am using:
Code:
If Me.Check16.Value = vbChecked Then
If strWHERE <> "" Then strWHERE = strWHERE & " AND "
strWHERE = strWHERE & "qryExamTaken.fkOverallstatus = 1"
End If
Thanks,
Ket