Date selection criteria expression help needed

T

tcek

i have a database with dates listed as the general date (date and time). some
of the cells have null (empty) values. I would like to query for null values
and today's date expressed as a long date (mm/dd/yyyy). I am having trouble.
any help would be greatly appreciated.
 
J

John Spencer

Field: YourDateField
Criteria: Is Null Or = Date()

OR
Field: YourDateField
Criteria (Line1): Is Null
Criteria (Line2): = Date()


'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
T

tcek

now() works but not date()

John Spencer said:
Field: YourDateField
Criteria: Is Null Or = Date()

OR
Field: YourDateField
Criteria (Line1): Is Null
Criteria (Line2): = Date()


'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
J

John Spencer

I suspect that you are storing the date and time in your field. In that
case try the following for the criteria.

Is null OR (>=Date() and < DateAdd("d",1,Date()))

If that still fails then you may have a problem with your library
references or you have defined Date as a function or possibly a field in
your table.


'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
Top