Reservation db

H

Harmannus

Hallo,

I have a db with rooms and reservation start- and end date/times for these
rooms. How can i visualise this on a form that lists all rooms and the date
and times on which they are reserved through a colored bar (e.g. red =
reserved)?

Thanx for any suggestions.


Regards,
Harmannus
 
A

Albert D. Kallal

Why not just ask the user for a date range...and then show ONLY rooms that
have bookings?

Then you can print out a list for rooms booked this week for example?

It also depends on how your system is setup. In the many reservation systems
I have written, un-sued spots do NOT have any records. All collisions and
bookings are handled by a start/end date...and NOT the filling of slots
(this approach saves tons of code)..

I mean, if there is only two rooms in use this week...that would make for a
very clean report for this week...and not some huge matrix?
 
H

Harmannus

Hallo,

Thanx for the reply. I will follow your suggestion!

Could you provide me with some examples to get my started?

Thanx in advance.

Regards,
Harmannus
 
A

Albert D. Kallal

Hum, lets see:

I would probably make a report by week, or perhaps the staff need a "daily"
report printed

I would simply build a nice form with a start/end date prompt (that is easy
for the user). Some prompt report ideas can be seen at:

http://www.attcanada.net/~kallal.msn/ridesrpt/ridesrpt.html

Once you got a start/end date range..then it is a simple sql statement to
show all people booked.

The sql is:

select Name, PhoneNumber, RoomNumber, CheckInDate, CheckOutDate * from
qryBookingsView
where dtStart <= CheckOutDate and dtEnd >= CheckInDate.

So, assuming you have a nice report based on the he above type of query (but
of course without the conditionals...since we will pass the conditions to
the report via the where clause. The button code to view the report from
your nice calendar prompt form would look like:

strStartDate = "#" & format(dtStart,"mm/dd/yyyy") & "#"
strEndDate = "#" & format(dtEnd,"mm/dd/yyyy") & "#"

strWhere = "CheckOutDate >= " & strStartDate & " and CheckInDate <= " &
strEndDate

docmd.OpenReprot "rptOccupency",acViewPreview,,strWhere

The above will show any collisions for the date range given..and thus you
get a current occupancy report for all people in the given time periods
(likely one day..or perhaps one week, or just perahps the week end).
 
H

Harmannus

Hallo,

Thanx for the help. This will surely get my started!

Much appreciated!

Regards,
Harmannus
 

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

Top