Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

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

???
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SteveL13

ASKER

Thank you.