V
vavroom
I am building a room allocation part of an existing database. This
section of the database uses a table with a date, a session, a room and
a supervisor. My table is using:
fldRoomingID - autonumber - primary key
fldDate - date field
fldSession - Text field
fldRoom - Lookup field, using room numbers from a defined list in
another table.
fldSupervisor - Lookup field, using supervisors name listed in
another table.
I created an index on fldDate, fldSession, fldRoom and flsSupervisor,
so you can't assign the same supervisor to the same room for the same
time, or any other variations on that theme.
To make data entry easier, I want to create a form where the combo box
selection of the supervisor would deliver only supervisors that
haven't been used for that date/session already. I'm not sure how
to write the criteria for it.
The SELECT statement for the combo box I have at the moment is:
SELECT tblInternalSupervisors.fldInternalSupervisorID,
tblInternalSupervisors.fldSupFName, tblInternalSupervisors.fldSupLName
FROM tblInternalSupervisors;
Obviously, I need a WHERE statement in there as well, which I'm not
wrapping my head around the logic needed for it.
Any ideas? Thanks a bunch
section of the database uses a table with a date, a session, a room and
a supervisor. My table is using:
fldRoomingID - autonumber - primary key
fldDate - date field
fldSession - Text field
fldRoom - Lookup field, using room numbers from a defined list in
another table.
fldSupervisor - Lookup field, using supervisors name listed in
another table.
I created an index on fldDate, fldSession, fldRoom and flsSupervisor,
so you can't assign the same supervisor to the same room for the same
time, or any other variations on that theme.
To make data entry easier, I want to create a form where the combo box
selection of the supervisor would deliver only supervisors that
haven't been used for that date/session already. I'm not sure how
to write the criteria for it.
The SELECT statement for the combo box I have at the moment is:
SELECT tblInternalSupervisors.fldInternalSupervisorID,
tblInternalSupervisors.fldSupFName, tblInternalSupervisors.fldSupLName
FROM tblInternalSupervisors;
Obviously, I need a WHERE statement in there as well, which I'm not
wrapping my head around the logic needed for it.
Any ideas? Thanks a bunch