MattioMatt
Registered User.
- Local time
- Today, 13:47
- Joined
- Apr 25, 2017
- Messages
- 99
Hi,
I'd like to be able to count the number of records between two sets of dynamic dates using an expression as I want to display this information in an unbound textbox on a form.
I have a column on a continuous form that shows "FirstDetected" as a date. I'd like to count the number of records that fall into the 4 following criteria.
The date shows vulnerabilities and when they were first picked up, I'm aiming to count records that are older than the following first criteria, how can I do that?
0-60 days
61-120 days
121-180 days
180+ days
I've tried the following as the control source on the textbox
I'm probably doing something really silly, I can't seem to work it out.
I'd like to be able to count the number of records between two sets of dynamic dates using an expression as I want to display this information in an unbound textbox on a form.
I have a column on a continuous form that shows "FirstDetected" as a date. I'd like to count the number of records that fall into the 4 following criteria.
The date shows vulnerabilities and when they were first picked up, I'm aiming to count records that are older than the following first criteria, how can I do that?
0-60 days
61-120 days
121-180 days
180+ days
I've tried the following as the control source on the textbox
Code:
=Count([FirstDetected] BETWEEN Date() AND >=Date()-60,1,0)
Code:
=DCount("*","qryUnionVulnAssets","[FirstDetected] Between =Date() & >=Date()-60 AND [AssetID] = " & [txtAssetID])
I'm probably doing something really silly, I can't seem to work it out.
Last edited: