Multiple criteria for one field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!!!
 
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"));
 
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));
 
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"));
 
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

Similar Threads

Please Fix This Query 1
Or Like "*VIN*" 3
Left Join 2
Criteria to Select Field to Update 4
Query within a report 1
Access Dcount (multiple criteria) 3
How to do Comparison Query 3
QUERY MULTIPLE CRITERIA 2

Back
Top