Company name look up

lsearcey

Board Regular
Joined
Sep 8, 2003
Messages
139
Is it possible to us a Query that a company name can be entered to look up names of companies and group them together.

Thank you
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
I have a customer database that has several fields like name address and phone number. It also has a combo box field that holds the name of the company they work for. I want to make a query that I can type in the name of the company and list all the contacts that work for that company. Thanks for your help any advice would be appreciated
 
Upvote 0
Of course you can...

Just in the WHERE section of your query use below:

WHERE CompanyName = "MicroSoft" (Substitute the company name you would like to search for) You can use

WHERE CompanyName = [Enter company name:]

if you would like the query to prompt you every time it is run for a company name.
 
Upvote 0
Thanks, It asks for the company but when I type in a company name that I know is listed in the compny name field it won't list any names. The comapny name field is a combo box does that make a difference?

thank you
 
Upvote 0
If the query is built on a combo box, it is very likely that the combo is storing an ID field and displaying a name. You need to rebuild the WHERE clause to use the ID field, not the name, and try again.

Denis
 
Upvote 0
In Design view, right-click the combo and select the Properties.
Go to the All tab, and scroll down to the series of rows that begins with Row Source.
First, check the Column Count. It is most likely 2 or more.
The Bound Column (this is the data that Access stores) will be 1, more often than not.
Now lok at the Row Source. Click the Builder (...) button in the Row Source line, to bring up the query grid. If Bound Column is 1, the first field in the grid is the one that you have to filter by. If it is 2, pick the second field, and so on. Close the grid but don't save.
To confirm which field the value is stored in, go to the top of the property list and check the Control Source.

Denis
 
Upvote 0
On the Row Source line there is no (...) button only a drop down button. There is a (...) button on he control source line. Is that the one I'm supposed to go to?

Thank You
 
Upvote 0

Forum statistics

Threads
1,214,645
Messages
6,120,711
Members
448,984
Latest member
foxpro

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
Back
Top