Linking two Combo Boxes

ram_Sathish

New Member
Joined
Jun 12, 2006
Messages
15
Hi all,

I have linked two combo boxes called center number and investigator name.

If I hit a number 1 in the combo box called center number then it has to show me the Investigators who are belongs to that center, it should not show me the other Investigators. I got my answer.

But i want it should be more user friendly.

Because i have linked the second combo box by a query.

While entry the query ask to enter the parameter value. It is not taking the value which is already available in the combo box called center number. The operator has to reenter the center name once again.

How to solve this problem.

Anyone please help me.

Thanks in advance.
 

Some videos you may like

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,931
Office Version
  1. 365
Platform
  1. Windows
Use the value from the 1st combobox as the parameter for the query.

If you look in help you'll see how to do that.
 

SydneyGeek

MrExcel MVP
Joined
Aug 5, 2003
Messages
12,251
Ram, there are 2 steps:

1. Investigators combo:
Rowsource is something like
SELECT * FROM tblInvestigators WHERE CallCentre = Forms![MyForm]!CallCentre

2. In the AfterUpdate event of CallCentre:
Investigators.Requery

The first step links combo 2 to combo 1
The second step forces combo 2 to refresh once you select from combo 1

Denis
 

Watch MrExcel Video

Forum statistics

Threads
1,114,407
Messages
5,547,774
Members
410,811
Latest member
adustin42
Top