Intricate domain for DCount

  • Thread starter breeden.christopher
  • Start date
B

breeden.christopher

I'm trying to do a weekly report that counts the number of work orders
done during each week. Given only the Open Date and Closed Date, I
can only know if a Work Order was opened during a certain week by
asking if Open Date was <= The end of the week and the Closed date is
Null (being it is still open) or is greater than the day of the end of
this week. I wanted to use DCount, but I dont know how I can put all
of that into the Domain of DCount. Any help would be appreciated.

This report is coming from a query [Weekly Report] and has the Feilds
of [Open Date], [Closed Date].

Thanks
 
J

John W. Vinson

I'm trying to do a weekly report that counts the number of work orders
done during each week. Given only the Open Date and Closed Date, I
can only know if a Work Order was opened during a certain week by
asking if Open Date was <= The end of the week and the Closed date is
Null (being it is still open) or is greater than the day of the end of
this week.

If ReportDate is an arbitrary date within the target week, try a criterion of

"[Open Date] >= #" & DateAdd("d", 1-Weekday([ReportDate]) & "# AND
NZ([ClosedDate], [ReportDate]) <= #" & DateAdd("d", 8-Weekday([ReportDate]) &
"#"


John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top