And statements

ahajee

New Member
Joined
Jul 29, 2004
Messages
33
I have 3 fields below. in my query, i want to see all the records not including MTG1 'and' O. i understand how to use 'and' statements for a particular field but how do you use 'and' statements for 2 different fields.

Loan # Doc Type O/C
1 CMTE
1 MTG1 C
1 MTG1 O
2 MTG1 C
2 CMTE
6 MTG1 O
6 MTG1 C
10
13 MTG1 O
20 CMTE
21 MTG1 C
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
WELCOME TO THE BOARD!

Using the Query Builder in Access, simply enter your conditions in the Criteria line under each field. If you put your conditions on the same row, they will be treated as "AND". If you put them on different rows, they will be treated as "OR".
 
Upvote 0
In the doc field criteria put <>"MTG1" and in the Type field in the same row put <>"O".

Generally in the query criteria:

same row - AND same

column - OR
 
Upvote 0

Forum statistics

Threads
1,221,783
Messages
6,161,938
Members
451,730
Latest member
BudgetGirl

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