Combo box question

K

Ken

I have an Access 2003 database with three main tables: Managers (primary key
= managersID), Projects (primary key = projectsID), and Tasks (primary key =
tasksID). There is a one-to-many relationship between Managers and Projects,
and between Projects and Tasks.

I need a form where the user first selects a Manager from a combo box, then
selects a Project from a combo box that shows only the projects for the
previously selected Manager. The form then needs to display all of the Tasks
records for that Project in a subform in datasheet view.

I’m having trouble getting the Project combo box to show only the projects
for the previously selected Manager. Any suggestions?
 
J

Jeff Boyce

Have you searched at mvps.org/access or at your favorite on-line search
engine for "cascading comboboxes"?

The basic concept is that you use a query to feed each combobox, and that
your query for the second includes a reference to the choice in the first
(for example: Forms!YourForm!cboYourFirstComboBox).

Then, in the AfterUpdate event for the first combobox, you add something
like:
Me!cboYourSecondComboBox.Requery

to get that second combobox to re-load.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
K

Ken

Thank you Jeff. I'll try your suggestion and see what happens!
--
Ken Elder
University of Oklahoma


Jeff Boyce said:
Have you searched at mvps.org/access or at your favorite on-line search
engine for "cascading comboboxes"?

The basic concept is that you use a query to feed each combobox, and that
your query for the second includes a reference to the choice in the first
(for example: Forms!YourForm!cboYourFirstComboBox).

Then, in the AfterUpdate event for the first combobox, you add something
like:
Me!cboYourSecondComboBox.Requery

to get that second combobox to re-load.

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