Re: How do you calculate a null date?



Nights: Nz(CheckOutDate,Nz([Enter another Date],Date())) - CheckInDate

--
Duane Hookom
MS Access MVP

"Rose" <Rose@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C9062228-7DF8-4A41-B72B-44021E3A5FF8@xxxxxxxxxxxxxxxx
Thank You, Thats what I was looking for. Is there a way to also input a
date
you want it to calculate the null field by. For example, if 09/30/2006.
--
Rose


"Duane Hookom" wrote:

It isn't clear what you want for the calculation if the CheckOutDate is
null. You can use the Nz() function like:

Nights: Nz(CheckOutDate,Date()) - CheckInDate


--
Duane Hookom
MS Access MVP

"Rose" <Rose@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E422FD92-48F5-4436-AC62-347E2B64D567@xxxxxxxxxxxxxxxx
I am getting to many arguments when I try to input your information.
Could
you try it again. I included an example below. Thank You.

Currently I have a query that states
Nights:[CheckOutDate]-[CheckInDate].
The problem is if there is no checkout date yet, how can I get it to
run
either today or by date input.


Check In Date Check Out Date Nights
09/01/2006 09/05/2006 4
09/10/2006 09/11/2006 1
09/12/2006
--
Rose





.



Relevant Pages

  • Re: Beginner query help please
    ... MS Access MVP ... Duane Hookom wrote: ... I've noticed that if you select all the query output (in this ... Controls in most query solutions would not be ignored. ...
    (microsoft.public.access.queries)
  • Re: Formula will not work with mail merge
    ... There is code that does this in the Query By Form ... > How do I push the records to a separate Word Merge format file? ... >> Duane Hookom ... >> MS Access MVP ...
    (microsoft.public.access.queries)
  • Re: Refer to a form in a pass-through query
    ... MS Access MVP ... Duane - you mentioned that I need to modify the SQL property of the p-t ... "Duane Hookom" wrote: ... The name of the query is PKLQ. ...
    (microsoft.public.access.queries)
  • Re: Beginner query help please
    ... MS Access MVP ... I've noticed that if you select all the query output (in this case ... Duane Hookom wrote: ... Controls in most query solutions would not be ignored. ...
    (microsoft.public.access.queries)
  • Re: Adding a ck mark?
    ... Duane Hookom ... MS Access MVP ... "txt1" is the name of a control in the detail section, ... Let's start a new report. ...
    (microsoft.public.access.reports)