You should be able to use the Weekday function to eliminate records that occur on certain
days of the week. You may need to adjust for the first day of the week in your locality.
Weekday(#10/23/2003#) = 5 for Thursday, to eliminate weekends you would not want
Weekday([DateField]) to be 1 or 7. You would set this to be a calculated field in the
query.
In the Query design grid
Field: NoWeekends:Weekday([TableName].[DateField])
Criteria: <>1 And <>7
You could uncheck the Show box unless you need the numbers 2-6 (for Mon - Fri) in the
output of the query for something else. It will filter on this even if the value doesn't
show in the output.
Question, if you are only working on Mon through Fri, how did records get in on Sat and
Sun? If there aren't any, you may not need to filter them out. If they are there, then
weren't Sat and Sun work days also?
The syntax for the Weekday function is Weekday(date, [firstdayofweek])
--
Wayne Morgan
Microsoft Access MVP
"BlackFireNova" <BFN_E-Subscriptions@myrealbox.com> wrote in message
news:3f987e90$0$196$75868355@news.frii.net...[color=blue]
> I need to write a report in which one part shows a count of how many
> total records fall within the working days (Monday - Friday) inside of a
> (prompted) given date range, in a particular geographical region.
>
> I have written a query which prompts the user for the start and end
> dates. It also filters for entries which pertain to the particular
> geographical region.
>
> I'm not sure where to go from here.
>
> How do I filter the results to show only the records within the prompted
> date range which fall within the Work Week (ie: Monday - Friday)? (
> ie: I need to somehow filter out Saturday and Sunday days/dates within
> the prompted date range)
>
> Once I have the query filtered to show only records which fall within
> the required date range, region, and only within the (Mon-Fri) Work
> Week, I then need a simple count of how many records there are. How do
> I achieve this result?
>
> Can anyone help me with suggested coding, and structure in the query
> grid so as to accomplish this result?
>
> BlackFireNova
>
> *** Sent via Developersdex
http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it![/color]