Access query help

karina

New Member
Joined
Apr 25, 2003
Messages
13
here is my table:
Company Address Deleted
AAA USA NO
AAA USA Yes
BBB Canada NO

I would like to select only those companies that have YES in "deleted" field (if they are duplicated as in AAA case). But if there is only one record for the comapny (as in BBB), I also wanna select it, even though "deleted" = "NO".

So the result of the query will give me this:
AAA USA Yes
BBB Canada NO

Can anyone please help me. I'm a little confused.
Thanx.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Are you just trying to get unique Companies from your table?

If you are. In the query design view, choose only company and address and click on the sum icon in the tool bar. It looks like a big letter E. Then run the query.

The sum feature will group, fields that are similar. If you want to know if it has a yes or no, that is another step, but I want to know if this helps first.

Parra
 
Upvote 0

Forum statistics

Threads
1,221,528
Messages
6,160,343
Members
451,638
Latest member
MyFlower

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