Suggest doing it a different way ---
Create a query that includes your date, line item and cases picked. Put the
following criteria in the date field:
Between [Enter Info Start Date] And [Enter Info End Date]
With the query in design view, click on the Sigma button (looks like capital
E) in the menu at the top of the screen. Then under cases picked, change
Group By to Avg.
When you run the query you will get the average cases picked in the time
period you entered. Access is smart enough to ignore days with no data when
calculating average.
PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
re******@pcdatasheet.com
"lucky33" <ki*******@bellsouth.netwrote in message
news:11**********************@q75g2000hsh.googlegr oups.com...
>I am using the AVG function in a report to show the average number of
cases picked per line item over a given period of time. For instance
the user might want the info from 07/16/07 to 07/20/07.
Can you make the AVG function only use the records that have data in
them. For instance there might be one day between 07/16/07 and
07/20/07 that nothing was picked so the number of cases per line item
would be zero and I do not want Access to calculate that zero amount
in the overall average due to the fact that the averages will show
lower than they actually are on the report.
All help is greatly appreciated.