Date selection criteria expression help needed

  • Thread starter Thread starter tcek
  • Start date Start date
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.
 
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
'====================================================
 
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
'====================================================
 
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
'====================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top