Help with Query please

roberttkim

Board Regular
Joined
Mar 5, 2009
Messages
97
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

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
You need to 'qualify' the query so you would say where company id = 400 OR id = 500 and so on.
 
Upvote 0

Forum statistics

Threads
1,214,986
Messages
6,122,611
Members
449,090
Latest member
vivek chauhan

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