SteveL13
asked on
Filter syntax issue
On a form I have a click event with this code:
Me.Filter = "[Sale Price] = " & Chr(34) & Me.txtSalePrice & Chr(34)
Me.FilterOn = True
But I get a data type mismatch error. The field is a Currence formatted field so I'm sure the syntax of my code is wrong. It works fine if the field is a text field.
Then,
I have the same issue with a date field... here's my code for that but I get a data type mismatch error there too...
Me.Filter = "[Sale Date] = " & Chr(34) & Me.txtSaleDate & Chr(34)
Me.FilterOn = True
???
Me.Filter = "[Sale Price] = " & Chr(34) & Me.txtSalePrice & Chr(34)
Me.FilterOn = True
But I get a data type mismatch error. The field is a Currence formatted field so I'm sure the syntax of my code is wrong. It works fine if the field is a text field.
Then,
I have the same issue with a date field... here's my code for that but I get a data type mismatch error there too...
Me.Filter = "[Sale Date] = " & Chr(34) & Me.txtSaleDate & Chr(34)
Me.FilterOn = True
???
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER