Help with Query please

roberttkim

Board Regular
Joined
Mar 5, 2009
Messages
96
I have an access table that has several company numbers, company account numbers associated with the company numbers, and balances. I am trying to run a query that pulls balances for company 1 and 2 for account numbers 400 and 500. However, when I run the query it brings back other company numbers with balances for the corresponding accounts in addition to what I was trying to get. For example it would bring balances in accounts 400 and 500 for company 1 and 2 which is what i need but it also brings back balances for account 400 and 500 for company 3, 4, 5. Is there a way to set up the criteria to only bring information for the companys that I am looking for?
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Kentman

Active Member
Joined
Apr 26, 2010
Messages
257
You need to 'qualify' the query so you would say where company id = 400 OR id = 500 and so on.
 
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,163,486
Messages
5,831,968
Members
430,098
Latest member
bemmelen

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