check then set a null date in a where clause

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to check todays date against a start and end date, where the end
date is usually null in a where clause in building a report.

In ORACLE I would use something in the way of :-
today between start date and nvl(end date,today+1)

What is the equivalent in ACCESS anyone please?

Please excuse my ignorance on this, but there appears to be no examples
anywhere on the web or within Access itself with an example of this condition.

Many thanks for looking.

Cheers,
Steve
 
I believe what you're looking for is the Nz() function.

Nz([EndDate], Date())

will return today's date if [EndDate] is Null. You can add 1 if you desire.

Nz([EndDate], Date()+1)

will return tomorrow's date if [EndDate] is Null.
 

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

Back
Top