If the filter are used for reports, you can use the WhereCondition section on
the OpenReport command line
Dim MyCondition As String
MyCondition = "Year([DateFieldName]) = " & Year(Date())
Docmd.OpenReport "ReportName" , , , MyCondition
--
Good Luck
BS"D
"Francophone" wrote:
> Currently I have a switchboard for printing reports that track performance
> over:
> 1. the current month
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13149
> 2. the previous 90 days
> 3. the current year
>
> The way I am doing this is by creating 3 different queries for those time
> periods and referencing those to create the 3 different reports via 3 control
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13149
> buttons.
> (ie. >=DateSerial(Year(Date()),1,1) - for current year)
>
> I think I can better do this by writing code for the 3 control buttons and
> automatically setting the 3 different criterias for the queries. Problem is
> I don't know how to do this. Can anyone please help?
>
> TIA