T
tod
I have a query that uses a View. Among the fields in the view are:
Date_Arrive
Date_Depart
Num_Party
The first two fields are Date/Time fields. The third is a number
field. My query needs to sum Num_Party and group it by month using
Date_Arrive. So I have a query like this:
Month Arrive: DateValue(Month(Date_Arrive)&"/1/"&Year(Date_Arrive))
Number in Party: Sum(Num_Party)
It looks goofy, but it always worked so I didn't question it. Now I
need to modify the query to use Date_Depart. I thought I could simply
replace Date_Arrive with Date_Depart and be done. However, Date_Depart
does not always have a value. So when I do the replacement I get a
type mismatch error.
How should I have been doing this in the first place? I just want to
sum all Num_Party values when grouped by month/year.
tod
Date_Arrive
Date_Depart
Num_Party
The first two fields are Date/Time fields. The third is a number
field. My query needs to sum Num_Party and group it by month using
Date_Arrive. So I have a query like this:
Month Arrive: DateValue(Month(Date_Arrive)&"/1/"&Year(Date_Arrive))
Number in Party: Sum(Num_Party)
It looks goofy, but it always worked so I didn't question it. Now I
need to modify the query to use Date_Depart. I thought I could simply
replace Date_Arrive with Date_Depart and be done. However, Date_Depart
does not always have a value. So when I do the replacement I get a
type mismatch error.
How should I have been doing this in the first place? I just want to
sum all Num_Party values when grouped by month/year.
tod