Hi.
I’m doing a routine where dates are extracted from Date Controls to compose a filter.
How to check for null in the controls avoiding (of course) the Exception?
Thanks in advance!

Hi.
I’m doing a routine where dates are extracted from Date Controls to compose a filter.
How to check for null in the controls avoiding (of course) the Exception?
Thanks in advance!
Haven’t tested, but isn’t there property text
for data controls? So
IF oDFS.Text <> "" THEN ds = oDFS.Date
would help.
If oDFS.Text = "" Or oDFE.Text = "" Then
MsgBox "Dates for the Period missing!"
Exit Sub
EndIf
Thank you!
Ok, thanks.
As they’re controls with date picker it would make no sense to insert no valid dates.
Learned about the Date property to compose a filter for a subform and didn’t think about possible Text one.
[IsEmpty]
Forgotten about Basic after several years!
This is a method from the interface XDateField
, the “namesake” of the Basic function.