S
StarfishJoe
I have two text boxes on a form formatted with a Short-Date mask
One of these two date fields may be left blank, or they both may be blank.
They both compare a date range and return all records within that date
range.
If both Date Fields on form are left blank. All records are returned.
If both are not left blank, then the results are all dates within that
range.
(so far so good)
If first date field is entered, and the second date field left blank, All
records equal to or later that first date are returned. (So far it seems to
work - or it did)
Problem:
If first Date Field left BLANK and second date field contains a valid date,
then the result should be All records on or before that date. I am getting
"Invalid Use of Null"
I started out trying to test for null and convert null values to empty
strings: ""
If isnull(txtDateFrom)=true then txtDateFrom = ""
Then I tried testing for a valid date:
if isdate(txtDateFrom=false) then....
It seems both of these are returning "invalid use of 'null'
Are these two equivilant; 'null' and " " ?
How should I represent an empty date textbox and compare it with another
date Text Box?
If txtDateFrom = ( blank, null, or empty string) and txtDateTo =< (Some
valid date like 06/19/05) then....
StarfishJoe
One of these two date fields may be left blank, or they both may be blank.
They both compare a date range and return all records within that date
range.
If both Date Fields on form are left blank. All records are returned.
If both are not left blank, then the results are all dates within that
range.
(so far so good)
If first date field is entered, and the second date field left blank, All
records equal to or later that first date are returned. (So far it seems to
work - or it did)
Problem:
If first Date Field left BLANK and second date field contains a valid date,
then the result should be All records on or before that date. I am getting
"Invalid Use of Null"
I started out trying to test for null and convert null values to empty
strings: ""
If isnull(txtDateFrom)=true then txtDateFrom = ""
Then I tried testing for a valid date:
if isdate(txtDateFrom=false) then....
It seems both of these are returning "invalid use of 'null'
Are these two equivilant; 'null' and " " ?
How should I represent an empty date textbox and compare it with another
date Text Box?
If txtDateFrom = ( blank, null, or empty string) and txtDateTo =< (Some
valid date like 06/19/05) then....
StarfishJoe