D
DubboPete
Hi Collective wisdom,
I want to know if it's possible to dynamically choose a field to base
a query around?
Scenario: 8 consulting rooms, and my table has Booking_Date, RM01,
RM02 thru RM08... A consultant's name goes in the RMxx field on any
particular date, so 17 May 12, RM07 is Dr Ocean; 17 May 12 RM08 is
Prof Lake, etc.
It's great at displaying on a daily basis what rooms are occupied, but
I am trying to 'flip' the data and query what future dates are
occupied for any one room, should anyone want to book for more than
one day/session...
I know it's easy with eight queries (one for each room) and the sql
looks like this:
SELECT TblCurrentYear.BOOKING_DATE, TblCurrentYear.RM03
FROM TblCurrentYear
WHERE
(((TblCurrentYear.BOOKING_DATE)>=Date())
AND
((TblCurrentYear.RM03) Is Not Null));
I'd like to dynamically change the Rmxx instance to whatever is chosen
in a Combo box.
Is it possible, or am I going about it the wrong way?
TIA
Pete
the 17th Century goat-herder
I want to know if it's possible to dynamically choose a field to base
a query around?
Scenario: 8 consulting rooms, and my table has Booking_Date, RM01,
RM02 thru RM08... A consultant's name goes in the RMxx field on any
particular date, so 17 May 12, RM07 is Dr Ocean; 17 May 12 RM08 is
Prof Lake, etc.
It's great at displaying on a daily basis what rooms are occupied, but
I am trying to 'flip' the data and query what future dates are
occupied for any one room, should anyone want to book for more than
one day/session...
I know it's easy with eight queries (one for each room) and the sql
looks like this:
SELECT TblCurrentYear.BOOKING_DATE, TblCurrentYear.RM03
FROM TblCurrentYear
WHERE
(((TblCurrentYear.BOOKING_DATE)>=Date())
AND
((TblCurrentYear.RM03) Is Not Null));
I'd like to dynamically change the Rmxx instance to whatever is chosen
in a Combo box.
Is it possible, or am I going about it the wrong way?
TIA
Pete
the 17th Century goat-herder