Between""And""

knzass

Registered User.
Local time
Today, 20:42
Joined
Oct 17, 2001
Messages
10
i have a form with two combo boxes "MonthStart" and "MonthEnd" each displaying the months of the year from january to december(ive assigned 1-jan,2-feb, etc)
i made a query which selects between these two values, the field name is "(DatePart("m",[Tb_Case_Log]![Date_Today])) "
and the criteria is " Between [Forms]![Fr_Statistic]![Month1] And [Forms]![Fr_Statistic]![Month2] "
(the query also has fields for group by and count)

i have a record which stores the number of cases...
august - 8 cases
september - 6 cases
october - case

i played with the combo boxes and these are the results

DateStart DateEnd
"august" "August" = 8 (ok)
"September" "September" = 6 (ok)
"october" "octber" = 1 (ok)
"august" "september" = 14 (ok)
"august" "october" = 9 (not ok)
"september" "october" = 15 (not ok)

what is wrong with the query?
 
opss the criteria is " Between [Forms]![Fr_Statistic]![MonthStart] And [Forms]![Fr_Statistic]![MonthEnd] "
(not MOnth1 and Month2)
 
Don't you think you need to consider the year as well? What's going to happen when you get to Jan 2002?
 

Users who are viewing this thread

Back
Top Bottom