select record and paste in form

G

Guest

I am building a training tracking database. I have all the separate tables
for employee info (name, title, dept......etc...), classes (dept, descr...),
etc, etc and also a registration table to link it all together for what
employee has taken what class and created forms that can be accessed either
from the Employee Info form to add a class this employee has taken as well as
from the Class Info form to add an employee that has taken this class. Since
the majority of the time the managers will be in the Class form to add
multiple employees to the class I was wondering how I could make it easier.
The registration form from the class info side automatically fills in the
class and the department and needed information would be the employee, if
they completed the class or were absent for any reason (a drop box), the date
of the class and the name of the trainer.
I need a way to select employees other than a standard combo box because 1.
There are quite a few employees and 2. I can only seem to get it to list the
employee id (pk) or even if it lists last name and first name in the drop box
when I select an employee it only shows the last name. I would like it so
when the manager goes to enter the employee name he/she can select from a
list where there is a check box and add that employee to the field. Is that
possible? Ultimately it would be great if they could select multiple
employees from this check list since they give a class (ie: 10+ employees)
and not one on one training. And then continue to fill out the rest of the
form with class date and trainer name as one since the info will be the same
for all employees selected.... Make sense?
Any ideas are greatly appreciated, thank you.
 
M

M Skabialka

Try using a multiple selection list box.

The Multi Select property should be Extended - i.e. Multiple items are
selected by holding down SHIFT and clicking them with the mouse or by
holding down SHIFT and pressing an arrow key to extend the selection from
the previously selected item to the current item. You can also select items
by dragging with the mouse. Holding down CTRL and clicking an item selects
or deselects that item.

I use the user selections as part of my query statement which is built in
code:

'#################################### DomainSelect
####################################
' Set the value of the loop counter.
intDomainIndex = 1
' Count total number of items selected
intDomainCounter = 0
' Determine which listbox items are selected.

strSQLDomain = ""

For Each intDomainIndex In DomainSelect.ItemsSelected
intDomainCounter = intDomainCounter + 1
HoldDomainSelect(intDomainCounter) =
Me!DomainSelect.ItemData(intDomainIndex)
Select Case intDomainCounter
Case 0
Case 1
strSQLDomain = "(tblCandidate.Domain = '" &
HoldDomainSelect(intDomainCounter) & "'"
Case Else
strSQLDomain = strSQLDomain & " OR tblCandidate.Domain =
'" & HoldDomainSelect(intDomainCounter) & "'"
End Select
Next intDomainIndex
If intDomainCounter = 0 Then
'MsgBox "No domain selected"
Else
strSQLDomain = strSQLDomain & ")"
End If

I am choosing from several list boxes on this form for a search routine, all
have similar code.
I include this section in my query after the SELECT and WHERE statements,
then close it up at the end.

HTH
Mich
 
G

Guest

Hmm, ok I made a list box of Employee names with multi select on. Now the
issue is this... I am registering these employees for training classes they
have taken. I selected a few employees from the list box, filled out the
rest of the info on the form as far as date completed, who taught the class,
etc.... when I clicked save... it updated the registration in all fields
except for the employees who took it. I now have one record showing a class
was completed on this date and that's all the information it shows.
I need to select 10 or more employees that all took this class at the same
time with the same trainer and so on and have it update separately... per
employee. Is that doable? That way the person entering the information
doesn't have to fill in the same information for the same class, one employee
at a time.
Thank you for your help
 

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

Similar Threads


Top