G
Grahammer
I'm trying to build an Access form to select some Crews for an Area from a
list of Crews belonging to a Branch. Table layout is shown below.
What I'd like to use on this form is a single Listbox. The form would also
have two textboxes with one containing the Branch index key (SelectedBranch)
and the other containing the Area index key (SelectedArea). The Listbox
would contain a list of all the Crews for the Branch (ie SELECT CrewDesc
FROM Crews WHERE BranchKeyLink=SelectedBranch). In each row of the Listbox
there would also be a checkbox. When checked it would indicate that the Crew
is related to the chosen area.
Can someone lend a hand as how to code this? Is it possible to put a
checkbox into a listbox? Is there possibly a better way to provide the same
functionality with a different kind of interface?
Any suggestions are appreciated!
Table BRANCHES:
BranchKey - Autonumber
BranchDesc - C25
Table CREWS:
CrewKey - Autonumber
CrewDesc - C25
BranchKeyLink - Number (Linked to Branches.BranchKey)
Table AREAS:
AreaKey - Autonumber
AreaDesc - C25
BranchKeyLink - Number (Linked to Branches.BranchKey)
Table AREACREWLINK:
AreaKeyLink - Number (Linked to Areas.AreaKey)
CrewKeyLink - Number (Linked to Crews.CrewKey)
list of Crews belonging to a Branch. Table layout is shown below.
What I'd like to use on this form is a single Listbox. The form would also
have two textboxes with one containing the Branch index key (SelectedBranch)
and the other containing the Area index key (SelectedArea). The Listbox
would contain a list of all the Crews for the Branch (ie SELECT CrewDesc
FROM Crews WHERE BranchKeyLink=SelectedBranch). In each row of the Listbox
there would also be a checkbox. When checked it would indicate that the Crew
is related to the chosen area.
Can someone lend a hand as how to code this? Is it possible to put a
checkbox into a listbox? Is there possibly a better way to provide the same
functionality with a different kind of interface?
Any suggestions are appreciated!
Table BRANCHES:
BranchKey - Autonumber
BranchDesc - C25
Table CREWS:
CrewKey - Autonumber
CrewDesc - C25
BranchKeyLink - Number (Linked to Branches.BranchKey)
Table AREAS:
AreaKey - Autonumber
AreaDesc - C25
BranchKeyLink - Number (Linked to Branches.BranchKey)
Table AREACREWLINK:
AreaKeyLink - Number (Linked to Areas.AreaKey)
CrewKeyLink - Number (Linked to Crews.CrewKey)