Codes for Checking Rooms Availability



I have a form with, among others, controls for RoomNo., CheckInDate and
CheckOutDate. I would like to check whether the RoomNo selected is occupied
for the period as stated in CheckInDate and CheckOutDate.

I have used the OpenRecordSet method for the AfterUpdate event in the form,
as follows:

Set rs = db.OpenRecordSet ("qryRoomsAvailable",dbOpenDynaSet)

However, this does not work. When I change "qryRoomsAvailable" to "tblRooms"
the codes seem to run alright.

Can anyone help me? TQ.


.



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)
  • 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)
  • Re: How do you calculate a null date?
    ... It isn't clear what you want for the calculation if the CheckOutDate is ... Nights: Nz) - CheckInDate ... Duane Hookom ...
    (microsoft.public.access.queries)