L
leahf via AccessMonster.com
I have a query with a field expression that checks that a begin_date is
greater/equal to 31/12/2006 and the end date is less than 01/01/2008. The
criteria is TRUE. It works perfectly.
What I want to do now is to take the year from a form. The expression that I
used:
Expr1: "([class]![class_begin_date]>=#31/12/" & [Forms]!
[frm_rptNtivStatistics]![ComboYear]-1 & "# And [class]![class_end_date]
<#01/01/" & [Forms]![frm_rptNtivStatistics]![ComboYear]+1 & "#)"
In other words, if the user chooses the year 2007, then I should get the
expression that I need. When I ran the query itself (not in the report), I
got in the expression field exactly what I thought that I wanted:
([class]![class_begin_date]>=#31/12/2006# And [class]![class_end_date]
<#01/01/2008#)
However, the output is all the records without limiting by dates.
What am I missing here?
Leah
greater/equal to 31/12/2006 and the end date is less than 01/01/2008. The
criteria is TRUE. It works perfectly.
What I want to do now is to take the year from a form. The expression that I
used:
Expr1: "([class]![class_begin_date]>=#31/12/" & [Forms]!
[frm_rptNtivStatistics]![ComboYear]-1 & "# And [class]![class_end_date]
<#01/01/" & [Forms]![frm_rptNtivStatistics]![ComboYear]+1 & "#)"
In other words, if the user chooses the year 2007, then I should get the
expression that I need. When I ran the query itself (not in the report), I
got in the expression field exactly what I thought that I wanted:
([class]![class_begin_date]>=#31/12/2006# And [class]![class_end_date]
<#01/01/2008#)
However, the output is all the records without limiting by dates.
What am I missing here?
Leah