Multiple Selections from dropdown lists

X

xX Longshank Xx

I am trining to create a training data base for the fire department. I have
an employee table created and I would like to make a drill form that would
enter in specifice drill information such as location, subject, hours,
description, and competencies covered. I would like to create a drop down
list of the employees names so the person entering the data couls select all
employees that attended the drill. This would allow me to query individual's
drill totals for the year. Is there a way to select multiple names from the
drop down combo box? I have tried but can only manage to select one name.
 
L

Larry Daugherty

Use a Listbox and set its "multiselect" property to what you want.

Once you have the selected values in the list box you must iterate the
Items in the Collection to see if their ".selected" property is true.

HTH
 
J

John Spencer

Back to basics.
You should have at least three tables in your database.
Table Drills
-- DrillID : a unique value identifying this specific drill (primary key)
-- Location
-- Subject
-- Hours
-- DrillDescription
-- Competencies (This should really end up adding another table or two if
there are multiple competencies involved)

Table Employees
-- EmployeeID : a unique value identifying this specific employee (primary
key)
-- EmployeeFirst
-- EmployeeLast
-- OTHER fields specific to an employee, such as rank, position, dob, etc

Table EmployeeDrills : Identify which employees attended which drills. The
two fields should be the primary key for the table.
-- DrillID
-- EmployeeID

Table Competencies : List of competencies
-- CompetencyID (primary key)
-- CompetencyDescription

Table DrillCompetencies (These two fields should be the primary key for this
table)
-- DrillID
-- CompetencyID

Data entry would be controlled by using a main form bound to the Drills
table and a subform bound to the employeeDrills table. You would enter one
record for each attendee in the subform. If you need more help with this,
then post back

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
X

xX Longshank Xx

I have designed the tables as you suggested to link the employee table to the
drill table. This makes more sense, I was trying to put an employees field
on the drill table and make the referrnce this way now I can see how those
two tables can be related. As I design the data entry form, I would like to
create a drop down list of employees names and be able to select all who
attended that particular drill. Will I now be able to do that. Thanks for
both of your responses, the help is great
 
J

John Spencer

You can have a drop down list and select one employee for each record. You
will have one record in the EmployeeDrills (Attendance table) for each
employee that attended the drill.

If you have a subform (continuous form) on the main form (single form -
showing a specific drill), Access will automatically fill in the DRILL ID as
you create recrods and you can select the employees from the drop down list.

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
X

xX Longshank Xx

I have made the sub form and form and it looks ok. I am unable to get a drop
down list to select the employees who attended the drill in the sub report.
The sub report is bound to the employeedrill table which only includes the
employee name and drill number (which is that tables primary key). I feel as
if I should somehow set up a look up function from the employee table that
places information in the employeedrill form. I am not exactly sure how to
accomplish this. I also need to be able to list each employee that has
attended. Thanks for your help so far, would have resoponded sooner but I
could not get the reply button to work right. Thanks
 
J

John W. Vinson

I have made the sub form and form and it looks ok. I am unable to get a drop
down list to select the employees who attended the drill in the sub report.
The sub report is bound to the employeedrill table which only includes the
employee name and drill number (which is that tables primary key).

That would seem to be the problem. The Drill Number *CANNOT* be the primary
key of the employeesdrill table; if it is, then you can enroll one and only
one employee in each drill, since the primary key must (by definition) occur
only once in the entire table.
I feel as
if I should somehow set up a look up function from the employee table that
places information in the employeedrill form.

I am not exactly sure how to
accomplish this. I also need to be able to list each employee that has
attended.

Ummm... that's exactly what the subform is for. To enter new employees, and to
list those who have already been entered.
Thanks for your help so far, would have resoponded sooner but I
could not get the reply button to work right. Thanks

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top