Windows Server Posted January 23 Posted January 23 Hello Experts, I am having a tough time adding a condition to a filter on a form. It works with 1 condition but not sure about the OR part (sq, dq)Maybe it is correct.The error I get is "Type Mismatch" see pic below.The row highlighted is the Remarks line. It seems odd because the fields are "short text" in the underlying table. Do you see an issue with the OR statement? If not, any ideas why I would be getting that error knowing that the fields are text? Private Sub txtEndUser_AfterUpdate() 'http://allenbrowne.com/ser-28.html If IsNull(Me.txtEndUser) Then Me.FilterOn = False Else Me.Filter = "[Remarks 1] Like '*" & [txtEndUser] & "*'" Or "[Remarks 2] Like '*" & [txtEndUser] & "*'" Me.FilterOn = True End If End Subhere is the table showing they are short text. the table is imported. as a reminder, I have no issues with 1 condition meaning it filters fine. View the full article Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.