Synchronizing List boxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The DB is being created in Access 2000 and is a First Aid trainer DB; each trainer has 1-6 roles and each role has many skills. I want to put the list boxes in a subform on the main trainer form and when a role is selected in the first list box, the appropriate skills to be selected in the second box (the role part could even be a combo box as there only has to be 1 selection at a time) (the skills list is the same all the time but the selections will differ depending on which role is picked).
My theory for a solution was to create a TrainerRoleID which is TrainerID and RoleID combined (e.g. TrainerID=2 & RoleID=3 ---- TrainerroleID=23) but I do not know how to have the DB automatically create this for me using just the list boxes or how to incorporate it once its done. Any help would be much appreciated.

TABLES
Key=K
ROLES:-Role ID, Roles SKILLS:-Skill ID, Skills TRJ:-TrainerRoleID, TrainerID, Skill ID TSJ:-TrainerID, TrainerRoleID, Skills ID TRAINER(mainform):-TrainerID

RELATIONSHIPS
00= many
[Role ID] 1----00 [TRJ.Role ID] [Skills ID] 1----00 [TSJ.Skills ID] [TrainerRoleID] 1----00 [TSJ.TrainerRoleID] [Trainer ID] 1----00 [TRJ.Trainer ID]
[Trainer ID] 1----1[TSJ.Trainer ID]
 
i want the row source of the second box to be the skills table all the time, its just the selections that will differ (i dont actually want to filter anything - i dont think).
I just wanted the first box to link to the roles table and NOT be multiple selection. And then to be able to do multiple selections on the second box whose selections should differ depending on the role that is higlighted (but the list should not change).
Is this still the way to do it?
Wayne Morgan said:
The general idea is to limit the data in the Row Source of the second combo
box based on the value in the first one being used as criteria for the query
in the second one's Row Source. An example can be found here.

http://www.mvps.org/access/forms/frm0028.htm

--
Wayne Morgan
Microsoft Access MVP


Fab-Ulus said:
The DB is being created in Access 2000 and is a First Aid trainer DB; each
trainer has 1-6 roles and each role has many skills. I want to put the
list boxes in a subform on the main trainer form and when a role is
selected in the first list box, the appropriate skills to be selected in
the second box (the role part could even be a combo box as there only has
to be 1 selection at a time) (the skills list is the same all the time but
the selections will differ depending on which role is picked).
My theory for a solution was to create a TrainerRoleID which is TrainerID
and RoleID combined (e.g. TrainerID=2 & RoleID=3 ---- TrainerroleID=23)
but I do not know how to have the DB automatically create this for me
using just the list boxes or how to incorporate it once its done. Any
help would be much appreciated.

TABLES
Key=K
ROLES:-Role ID, Roles SKILLS:-Skill ID, Skills TRJ:-TrainerRoleID,
TrainerID, Skill ID TSJ:-TrainerID, TrainerRoleID, Skills ID
TRAINER(mainform):-TrainerID

RELATIONSHIPS
00= many
[Role ID] 1----00 [TRJ.Role ID] [Skills ID] 1----00 [TSJ.Skills ID]
[TrainerRoleID] 1----00 [TSJ.TrainerRoleID] [Trainer ID] 1----00
[TRJ.Trainer ID]
[Trainer ID] 1----1[TSJ.Trainer ID]
 
Yes, what you are asking for is what I sent you in the example link. You
want the 2nd list to be limited (i.e. filtered) by the first list. You are
correct, the first list would usually not be multi-select, the 2nd could or
could not be, your choice. Whether these are combo boxes or list boxes, the
principle is the same, except a combo box won't do multi-select.
 
Hi,

I have a similar question about synchronizing a combo box
to a list box. If the user clicks on on one of the
options in the combo box (a book title), and I want a list
box to be populated (author, isbn, language,etc.), if the
user updates the list box in the form will the changes be
made to the table as well?
 
You can't type into a list box. What method would you be using to "update"
the list box? If you are simply refering to the list box's list being
refiltered by the selection in the combo box, no, that will not affect the
source table.
 
Back
Top