Multiple criteria for one field

S

Stockwell43

Hello,

I have what I hope is a simple request but I am not sure on how to perform
it. I need to create a query with only two fields: Branch Number and Loan
Type.

I need to pull all the records for Branches 061, 02, 43, 88 and 33, I also
need to pull all Loan Type 1's. The loan type shouldn't be a problem but how
do I pull multiple branches in the criteria field in the query? Please
simplify answer as queries are not my strongest area of Access.

Thanks!!!
 
K

KARL DEWEY

Try this --
SELECT YourTable.Branches, YourTable.YourFieldName
FROM YourTable
WHERE (((YourTable.Branches)="061" Or (YourTable.Branches)=" 02" Or
(YourTable.Branches)="43" Or (YourTable.Branches)="88" Or
(YourTable.Branches)="33") AND ((YourTable.YourFieldName)="Loan Type 1's"));
 
G

George Nicholson

In design view:
[Branch] criteria: In('061', '02', '43', '88', '33')
[LoanType] criteria: 1

The SQL should then include something like:
....WHERE (([Branch] In('061', '02', '43', '88', '33')) AND ([LoanType] =
1));
 
S

Stockwell43

Hi Karl,

Worked like a gem, thank you!!!!

KARL DEWEY said:
Try this --
SELECT YourTable.Branches, YourTable.YourFieldName
FROM YourTable
WHERE (((YourTable.Branches)="061" Or (YourTable.Branches)=" 02" Or
(YourTable.Branches)="43" Or (YourTable.Branches)="88" Or
(YourTable.Branches)="33") AND ((YourTable.YourFieldName)="Loan Type 1's"));
 
S

Stockwell43

Excellent! Thank you very much for your help, I'll save this with my other
access instructions for future reference.

George Nicholson said:
In design view:
[Branch] criteria: In('061', '02', '43', '88', '33')
[LoanType] criteria: 1

The SQL should then include something like:
....WHERE (([Branch] In('061', '02', '43', '88', '33')) AND ([LoanType] =
1));


--
HTH,
George


Stockwell43 said:
Hello,

I have what I hope is a simple request but I am not sure on how to perform
it. I need to create a query with only two fields: Branch Number and Loan
Type.

I need to pull all the records for Branches 061, 02, 43, 88 and 33, I also
need to pull all Loan Type 1's. The loan type shouldn't be a problem but
how
do I pull multiple branches in the criteria field in the query? Please
simplify answer as queries are not my strongest area of Access.

Thanks!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top