Filter Data by Date/time (field)

Sniper-BoOyA-

Registered User.
Local time
Today, 14:53
Joined
Jun 15, 2010
Messages
204
Good morning,

Ive got a small "problem".

Ive got 2 values. D7 and D28. And i want to filter it by using a date/time field. Both D7 as D28 have their own date/time field, and i would like to filter it like this:

D7

Code:
Iff (Date/time field D7 = "";"";D7)
Same with D28:

Code:
Iff (Date/time field D28 = "";"";D28)

But when i run this query it shows an #error.

Any ideas?
 
Access ofcourse. There are no queries in Excel ;)

Code:
test: IIf([Drukdatumd7]="";"";[d7])

Only works when Drukdatumd7= empty.

If i enter a date, i get #error as result.
 
Try this:

Code:
test: IIf([Drukdatumd7]Is Null;Null;[d7])

JR
 
I would be inclined to change it to:
Code:
test: IIf([COLOR=Red]IsNull([/COLOR][Drukdatumd7][COLOR=Red])[/COLOR];Null;[d7])
... because Is Null is built for the WHERE part of an SQL statement whereas IsNull() is a function used for comparison.
 

Users who are viewing this thread

Back
Top Bottom