Date Validation Problems. (1 Viewer)

HillTJ

Registered User.
Local time
Yesterday, 19:19
Joined
Apr 1, 2019
Messages
502
Friends, I have a form with Controls 'StartDate' & 'EndDate'. I wish the user to enter either a start date or end date or both as long as 'EndDate'>='StartDate'.

The Validation Rule for the 'StartDate' control is =([StartDate] Is Null) Or ([EndDate] Is Null) Or ([StartDate]<=[EndDate]) - Thisworks.

But if I try the same validation on the 'EndDate' Control it always displays my validation Text even if' StartDate' is null.

Why?

Appreciate it as always.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 14:19
Joined
May 7, 2009
Messages
14,091
can you use a Form and use the Control's Before Update to validate.
 

Eugene-LS

Registered User.
Local time
Today, 09:19
Joined
Dec 7, 2018
Messages
45
it always displays my validation Text even if' StartDate' is null.
I checked your condition for myself, it works as expected.
 

Attachments

  • Снимок.PNG
    Снимок.PNG
    15.4 KB · Views: 7

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 14:19
Joined
May 7, 2009
Messages
14,091
you can also use this validation for both controls:

Nz([StartDate],#1/1/1800#)<=Nz([EndDate],#12/31/9999#)
 

HillTJ

Registered User.
Local time
Yesterday, 19:19
Joined
Apr 1, 2019
Messages
502
Gents, thanks. I should also have stated that both the 'startdate' & 'enddate' controls are unbound and used as a component of a filter string. If that helps. Will try @arnelgp 's suggestion. Thanks
 

Users who are viewing this thread

Top Bottom