Oct 21 2004, 10:00 AM
Is it possible for me to use a drop down box [getyear] with a list/value of 2004;2005;2006 etc to filter records by year on a form by [arrival_date]. arrival_date uses short date format.
I have tried DatePart(yyyy,[arrival_date]= [geyear] on "On Change" but I get the error message that the formula is too complex.
Any help would be appreciated
Oct 21 2004, 10:07 AM
Year([Arrival_Date]) = [getyear]
Oct 21 2004, 11:52 AM
Tried that but it then comes up wanting parameter values for [arrival_date] and then [get_year]. So I then tried using a command btn and putting your expression on on-click and it still asks for the parameter values, but thanks for trying AJ
Oct 22 2004, 04:36 PM
I would try tying the combo box to an aggregate (i.e. sum) query with the same data source as that the form is on; but where there is just one field - a calculated expression for the year (i.e. get_year: DatePart("yyyy",[arrival_date]) and no other data fields.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here