choose multiple catergories

G

Guest

Hi,
Is there any way i can choose more than one value, using a list box in a
table?
In one of my tables employees sometimes belong to 2 or 3 categories (shemes).
How would i show whos in what category (sheme)?
Thanks Alot
 
N

Nikos Yannacopoulos

In one of my tables employees sometimes belong to 2 or 3 categories (shemes).

In that case then you shouldn't do it with a single table, you need
another table for categories per employee, having fields EmployeeID and
CategoryID (it;'s a typical one-to-many relationship). You could then
use any of a number of options for entering / displaying this data; the
most commonly employed method for one-to-many relationships is by means
of a subform (for the many side table, yet it is doable with a
multi-select listbox like you envisage, except that requires some VBA
code for both data entry and display... but that should be the least of
your worries at this point, you should aim at getting your data design
right first and foremost.

HTH,
Nikos
 
J

Joan Wild

You need at least two tables:
Employees:
EmployeeID
FirstName
LastName
etc.

EmpCategories:
EmployeeID
Category

You then would create a form with the Employee information; and use a
subform for the categories.

If you create a relationship between EmployeeID in Employees table and the
EmployeeID in the EmpCategories table, you can use the wizard to create a
mainform/subform for you.
 
G

Guest

Ok, thanks. I think i was trying to avoid retyping each employee with each
individual scheme they belong to. At the moment i have about 70 employees in
the table.
 
J

Joan Wild

But you don't need to retype them. Once you have the form setup, the main
form will have the Employee information. You just enter the scheme(s) they
belong to in the subform. Then go to the next record on the main form - the
next employee will show, and again you can enter their scheme(s) in the
subform, etc.
 
G

Guest

Arh, thanks.

Joan Wild said:
But you don't need to retype them. Once you have the form setup, the main
form will have the Employee information. You just enter the scheme(s) they
belong to in the subform. Then go to the next record on the main form - the
next employee will show, and again you can enter their scheme(s) in the
subform, etc.
 

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