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.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,351
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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,168,130
Messages
5,857,551
Members
431,885
Latest member
Rsdg

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top