I'm not sure I get it yet, but it sounds like your tables may be set up to
"match" your physical situation. If so, check into "normalization" and
"relational database design" ... tables in a relational database like Access
need to reflect the "things" about which you keep information, and don't
have to (and shouldn't necessarily) be a match for the physical.
It sounds like you have Students, Rooms, and Student-in-Room ... these would
be the underlying tables if I've correctly understood your situation.
Until your data structure is something more like what Access works best
with, coming up with a "how do I do it" answer may only make your
application more complex than it needs to be.
Please post your underlying data structure. Here's a simplified example of
a Registration database...
tblStudent
StudentID
LastName
FirstName
DOB
tblClass
ClassID
ClassTitle
ClassDescription
trelRegistration
RegistrationID
StudentID
ClassID
RegistrationDate
Good luck!
Regards
Jeff Boyce
Microsoft Access MVP
--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.
Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.
You can thank the FTC of the USA for making this disclaimer
possible/necessary.
Gntlhnds said:
I have a table that has all of my students, and then a table that has all
of
the barracks room I manage. What I want to happen is as I gain a student,
I
have a combo box with all the available rooms, and I can select one to
place
the student in. Then as the student leaves, I have a check-box (Archive)
that affects how the student is displayed on various forms, but it also
removes the room assignment for that student. The problem I'm having is
the
combo box. Having the separate table was how I was keeping the combo box
updated so that it would only have the vacant rooms show up. If there is
a
better way, I'm open. Thanks for the help.
Jeff Boyce said:
Am I understanding you correctly? You already have values for [LastName]
and [FirstName] in one table, and you are trying to stuff those values
into
a second table?
If so, why?! Access is a relational database, so you don't need to copy
over names and other fields from one spreadsheet to ... oops, I meant
from
one table to another.<g>
Regards
Jeff Boyce
Microsoft Access MVP
--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.
Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.
You can thank the FTC of the USA for making this disclaimer
possible/necessary.
I have an Update Query that updates two fields [Last Name], [First Name]
in
one table (Barracks Rooms) based on one field [Room #] in another table
(Students). If [Room #] in (Students) is Null, I want [Last Name],
[First
Name] in (Barracks) to be Null. If [Room #] in (Students) has a value,
I
want [Last Name], [First Name] in (Barracks Rooms) to reflect [Last
Name],
[First Name] in (Students). What would be my SQL statement for that?
I've
already determined that I can't set it up the way I want in the design
view.
Thanks for all the help.
.
.