Combo box question

  • Thread starter Thread starter Ken
  • Start date Start date
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?
 
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
 
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
 
Back
Top