Not sure how to do this with combobox

  • Thread starter Thread starter NewbieAtLarge
  • Start date Start date
N

NewbieAtLarge

Hi,

I am creating an access db and want to create two combo
boxes that are related to each other.

For example.
The first combo box list all the department names, eg:
Marketing, Accounting, etc.

The second combo box will list the people that are in the
department.

So if I select Marketing in the first combo box, I want to
see all the users in Marketing in the second combo box.
If I select Accounting, I want to see all the users in
accounting in the second combo box.

Thanks for any help.

NewbieAtlarge
 
The second combo rowsource should read something like (change the fieldnames
to suit your application):

Select * From tblPeople Where DeptID = Forms!YourFormName!cboDepartment;

Use the AfterUpdate event of the first combo to requery the second:

Me.cboPeople.Requery
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top