DeathTrap82
Registered User.
- Local time
- Today, 09:14
- Joined
- Jun 25, 2012
- Messages
- 10
I'm having a bit of trouble creating a DCount statement in my code, I'm hoping that I can get help for it here. I'm also hoping I'm posting this in the right section 
Basically, what I'm trying to do is get the number of childbearing leaves after a given date (newStart, in this case).... However, it's giving me false positives - giving me a result (for example), when newStart is 7/1/2009 and the leave date (LeaveEnd) is 9/19/1996. The DOMID (and rID) are identifiers where I make sure I'm looking at the right person - and I am....it's just the last criteria where things seem to go a bit off.
Basically, what I'm trying to do is get the number of childbearing leaves after a given date (newStart, in this case).... However, it's giving me false positives - giving me a result (for example), when newStart is 7/1/2009 and the leave date (LeaveEnd) is 9/19/1996. The DOMID (and rID) are identifiers where I make sure I'm looking at the right person - and I am....it's just the last criteria where things seem to go a bit off.
Code:
delay = DCount("*", "[Leave]", "[DOMID] = " & rID & " And [LeaveType] = 'Childbearing Leave' And [LeaveEnd] > " & newStart)
Last edited: