Re: How do you calculate a null date?



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: Updating form using Query
    ... SELECT bookID, CheckOutDate, CheckInDate ... normally run queries using DoCmd.openquery but it won't work in this case. ...
    (microsoft.public.access.queries)
  • Codes for Checking Rooms Availability
    ... I have a form with, among others, controls for RoomNo., CheckInDate and ... for the period as stated in CheckInDate and CheckOutDate. ... the codes seem to run alright. ...
    (comp.databases.ms-access)
  • Re: Codes for Checking Rooms Availability
    ... for the period as stated in CheckInDate and CheckOutDate. ... I have used the OpenRecordSet method for the AfterUpdate event in the ... "tblRooms" the codes seem to run alright. ...
    (comp.databases.ms-access)