I have an "on the fly" query within a form that has a checkbox (ckReWork) and a table (tblHourEnter) with a Yes/No field. When the query is run with the checkbox un-ticked I get results of all line items in table except those that are ticked. And when ticked get results of all ticked items. All as expected.
When the checkbox is un-ticked I would like a result that includes all ticked and un-ticked items. How do I modify the code (only part of the code is given) below to do this? Thanks Sandy
When the checkbox is un-ticked I would like a result that includes all ticked and un-ticked items. How do I modify the code (only part of the code is given) below to do this? Thanks Sandy
Code:
If Not IsNull(Me.ckReWork.Value) = True Then
strSQL = strSQL & " AND tblHourEnter.ReWork=" & Me.ckReWork.Value & " "
End If