BradCollins
Technical User
I am not even sure that what I want to do is possible, but I figured after weeks of trying that you guys might be able to stear me in the right direction.
I have a booking system table laid out as such:
tblBookings:
fldRoomID (Number)
fldBookIn (Date)
fldBookOut (Date)
tblRooms:
fldRoomID (Number)
fldRoomName (Text)
Next I created a continuous form (bound to the Rooms table) that has several unbound fields in the form header and in the details shows the list of Rooms.
The unbound fields in the form header are laid out as :
Date() Date()+1 Date()+2 Date()+3 Date+4 X Y
The X & Y are navigation buttons to plus or minus a day from each unbound field allowing the user to scroll through the dates.
Now in the detail I would like to put an equivalent amount of unbound fields that will display "BOOKED" if the room is taken. Whilst I can do this if I bind the form to the bookings table, it gives me all the bookings for one room on a seperate line per booking, I would like one line per room and be able to display whether or not that room is booked.
As all of this data is dynamic, I was wondering if it is possible to lookup the booking dates (both in & out)according to the roomID and then display them on only one line, instead of multiple lines.
I have played around with dlookup and iif statements but just cant get this to work.
Any advice or tips would be most appreciated. Thank you
I have a booking system table laid out as such:
tblBookings:
fldRoomID (Number)
fldBookIn (Date)
fldBookOut (Date)
tblRooms:
fldRoomID (Number)
fldRoomName (Text)
Next I created a continuous form (bound to the Rooms table) that has several unbound fields in the form header and in the details shows the list of Rooms.
The unbound fields in the form header are laid out as :
Date() Date()+1 Date()+2 Date()+3 Date+4 X Y
The X & Y are navigation buttons to plus or minus a day from each unbound field allowing the user to scroll through the dates.
Now in the detail I would like to put an equivalent amount of unbound fields that will display "BOOKED" if the room is taken. Whilst I can do this if I bind the form to the bookings table, it gives me all the bookings for one room on a seperate line per booking, I would like one line per room and be able to display whether or not that room is booked.
As all of this data is dynamic, I was wondering if it is possible to lookup the booking dates (both in & out)according to the roomID and then display them on only one line, instead of multiple lines.
I have played around with dlookup and iif statements but just cant get this to work.
Any advice or tips would be most appreciated. Thank you