filter by year (1 Viewer)

tubar

Registered User.
Local time
Yesterday, 22:22
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
 

Gasman

Enthusiastic Amateur
Local time
Today, 04:22
Joined
Sep 21, 2011
Messages
14,231
What happened to the
= True?
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:22
Joined
Oct 29, 2018
Messages
21,453
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

Top Bottom