bmhuettinger
Registered User.
- Local time
- Today, 06:54
- Joined
- Jul 28, 2017
- Messages
- 59
Good morning all,
I've spent two days scouring the web for a solution to what should be a simple problem. I've got a summary form that displays various metrics for the month's shipments. The form has controls that reference several queries based on one table. I have Dsums and Dcounts that work fine but my issue is with a Dcount control ([On Time]) that is trying to count the number of orders that are "on time" based on query that first calculates the number of days late:
(user defined field) [Past Due]
ateDiff("d",[due date],[Delete Dt])
And then assigns a status:
(user defined field) [Status]: IIf([Past Due] Between -8 And 0,"ON TIME: WEEK OF",IIf([Past Due]<-8,"MORE THAN 1 WEEK EARLY",IIf([Past Due] Between 1 And 7,"LATE:WEEK OF",IIf([Past Due] Between 7 And 14,"2 WEEKS LATE",IIf([Past Due]>14,"MORE THAN 3 WEEKS LATE","")))))
The query works fine. But I can't get the form control to count the orders that meet the criteria ("More than 1 week Early", "On Time: Week of", etc...
I've tried Dcount and Sum (assigning value to the results), and I believe that I've tried every iteration of the formula referenced on the internet.
most basic and most popular is this one:
=DCount("[orders]","qry_OnTimeDeliveryPerformance","[Status] = 'Two Weeks Late'")
Thank you in advance.
Brandi
I've spent two days scouring the web for a solution to what should be a simple problem. I've got a summary form that displays various metrics for the month's shipments. The form has controls that reference several queries based on one table. I have Dsums and Dcounts that work fine but my issue is with a Dcount control ([On Time]) that is trying to count the number of orders that are "on time" based on query that first calculates the number of days late:
(user defined field) [Past Due]

And then assigns a status:
(user defined field) [Status]: IIf([Past Due] Between -8 And 0,"ON TIME: WEEK OF",IIf([Past Due]<-8,"MORE THAN 1 WEEK EARLY",IIf([Past Due] Between 1 And 7,"LATE:WEEK OF",IIf([Past Due] Between 7 And 14,"2 WEEKS LATE",IIf([Past Due]>14,"MORE THAN 3 WEEKS LATE","")))))
The query works fine. But I can't get the form control to count the orders that meet the criteria ("More than 1 week Early", "On Time: Week of", etc...
I've tried Dcount and Sum (assigning value to the results), and I believe that I've tried every iteration of the formula referenced on the internet.
most basic and most popular is this one:
=DCount("[orders]","qry_OnTimeDeliveryPerformance","[Status] = 'Two Weeks Late'")
Thank you in advance.
Brandi