OK I agree that using single quotes does work if I switch off SQL Server compatible syntax.
I've used that as the default for so long that I didn't consider the alternative.
As most of my databases work with SQL Server BEs that seems logical to me
Apologies for doubting you.
Having said that my code works whichever syntax is used for the database, so I'll continue to use SQL Server compatible syntax
I would be interested to know which the majority of experienced developers use
Private Sub ComboWSIB_After_Update()
Select Case Me.ComboWSIB
Case "Yes", "No"
Me.Filter = "[WSIB Employer Declaration Complete?] = '" & Me.ComboWSIB & "'"
Me.FilterOn = True
Case Else
Me.FilterOn = False
End Select
End Sub
Hmmmmm...well, I have implemented the code (thanks to MarkK). The datasheet does filter based on yes,no or all. However when I clicked "Yes" the record with (Jan 18/17) is absent. I will continue to play around with it. But this is closer than what I had before. Thank you.
I appreciate all the work you put into this. However, when I went to try your code, I was prompted with the Complete dialog box. I typed "Yes" and got some results back. When I clicked on "No" or "All", in the dropdown, nothing came at all. Again I know this is a complicated task. Believe me I wish whoever constructed database didn't include such odd records. Worst case scenario, I will include a text box or some kind of instructions for right clicking and using the datasheet's own text filtering capabilities. But as usual I will fiddle around with it and thank you all for your guidance and insight!
It works, I made the silly mistake of not changing [Complete] to [WSIB Employer Declaration Complete?]. It works perfectly now. Thank you Ridders and everyone else!