Selecting more then one item in a lookup field.

S

Sara

I am setting up a database for a company that puts on courses for lawyers.
We have a field to identify practice area but some courses fall under more
than one practice area. Is there a way to select more then one item in a
drop down field.
 
K

Keith Wilby

Sara said:
I am setting up a database for a company that puts on courses for lawyers.
We have a field to identify practice area but some courses fall under more
than one practice area. Is there a way to select more then one item in a
drop down field.

No, but since what you have there is a one-to-many relationship, what you
could have is a sub-form on your form to contain the combo box so that you
can choose as many areas as you like. You *are* using forms, right? :)

Keith.
www.keithwilby.co.uk
 
S

Steve

TblCourse
CourseID
CourseName

TblPracticeArea
PracticeAreaID
PracticeArea

TblCoursePracticeArea
CoursePracticeAreaID
CourseID
PracticeAreaID

First create a form based on TblPracticeArea to enter all practice areas.
Then create a form/subform. Base the main form on TblCourse and the subform
on TblCoursePracticeArea. Besure the LinkMaster and LinkChild properties are
set to CourseID. You will then be able to enter all courses in the main form
and for each course you will be abe to enter a list of practice areas the
course applies to in the subform.

Steve
 
J

Jeff Boyce

Sara

You might be able to use a "multi-select" approach, but I'm with Keith ...
it sounds like you have a one-to-many relationship. There are other
approaches that can help in that instance.

If you stick with a multi-select approach, be aware that you'll need to add
code/procedures that iterate through the list of selected items and process
each one. This is considerably more work that simply selecting a single
item and processing that selection.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access 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