There are a couple of ways you can do this. I think what you want is anything containing the entry in the comment field of a form? Then it would be:
Code:
If [Forms]![frm_SpecificInfo]![Comments] <> "*" _
Then WhereStr = WhereStr & " AND tbl_Data_Setinfo.comments Like ""*" _
& [Forms]![frm_SpecificInfo]![Comments] & "*"" "
Without any wildcards a like works basically the same as =
Another way to do this is:
Code:
If [Forms]![frm_SpecificInfo]![Comments] <> "*" _
Then WhereStr = WhereStr & " AND InStr(1,tbl_Data_Setinfo.comments,""" _
& [Forms]![frm_SpecificInfo]![Comments] & """) > 0 "
Also I'd personally steer clear of using ! and start using . instead