Date Validation Problems. (1 Viewer)

HillTJ

To train a dog, first know more than the dog..
Local time
Today, 09:14
Joined
Apr 1, 2019
Messages
712
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
Tomorrow, 04:14
Joined
May 7, 2009
Messages
19,169
can you use a Form and use the Control's Before Update to validate.
 

Eugene-LS

Registered User.
Local time
Today, 23:14
Joined
Dec 7, 2018
Messages
481
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: 161

arnelgp

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

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

HillTJ

To train a dog, first know more than the dog..
Local time
Today, 09:14
Joined
Apr 1, 2019
Messages
712
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