filter by year

tubar

Registered User.
Local time
Yesterday, 22:53
Joined
Jul 13, 2006
Messages
190
Im trying to filter my forms date field by year with a button.
Code:
Me.Filter = "year([date])='2019'"
Me.FilterOn
when i apply the code to filter by month it works fine.
Code:
Me.Filter = "month([date])= '10'"
Me.FilterOn = True
I even tried creating an unbound text field that displays the date field formatted for year and filtering that. any suggestions on a VBA fix
 
What happened to the
= True?
 
Hi. I agree with Gasman. You forgot to assign True to Me.FilterOn. Did you get an error without it?
 

Users who are viewing this thread

Back
Top Bottom