April15Hater
Accountant
- Local time
- Yesterday, 21:48
- Joined
- Sep 12, 2008
- Messages
- 349
Hi-
I'm having trouble getting a validation rule to work. My textbox (txtTimeOutDate) is allowing values that are not valid.
The DateDiff is what is in question. I'm trying to keep users from entering more than one day between txtTimeOutDate and txtTimeInDate and it is allowing those values. I have a feeling it is because I'm referencing [txtTimeOutDate] in it's own validation. If that's the case is there a way around that?
Thanks,
Joe
I'm having trouble getting a validation rule to work. My textbox (txtTimeOutDate) is allowing values that are not valid.
Code:
<=[Forms]![frmHoursTracking]![cboWeekEnding] And
>=([Forms]![frmHoursTracking]![cboWeekEnding]-6) And
DateDiff("d",[txtTimeOutDate],[txtTimeInDate])<=1
The DateDiff is what is in question. I'm trying to keep users from entering more than one day between txtTimeOutDate and txtTimeInDate and it is allowing those values. I have a feeling it is because I'm referencing [txtTimeOutDate] in it's own validation. If that's the case is there a way around that?
Thanks,
Joe