Windows XP/Access 2000

  • Thread starter Thread starter JR
  • Start date Start date
J

JR

In the code for a form I am using the date function "Date
()" to compare dates. Only on a machine with Windows XP do
I get the following error:
"Function is not available in expressions in query
expression '((([start_date]<=Date() And [end_date] Is
Null) Like True))'."

I know the issue is with the Date() function, but I cannot
remember what is required to fix it. I thought it was
just "Date" but that does not work either.

Any help would be appreciated.

Thanks, JR
 
JR,

Instead of [end_date] Is Null say, IsNull([end_date])

You need the Isnull() function to test for a null value. I don't know if
that is the only problem in your expression, but I think it is one.

God Bless,

Mark A. Sam
 
For some reason Windows XP does not reconize the date
function "Date()". By using "Now()" I resolved the problem.

FYI
JR
 
I had the same thing happen when trying to set the default date value in a table to Date(). You can substitute Int(Now()) for Date() or, like I did, create a new database, import your old data and re-try using the Date() function. Somehow mdb's can get corrupted and I couldn't fix the date() function problem. The Now() function includes time so comparisons to dates may not work right

Cheers
JohnC
 
Back
Top