Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2007

Tip: Looking for answers? Try searching our database.

Multiple criteria for one field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stockwell43 - 06 Nov 2007 18:04 GMT
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!!!
KARL DEWEY - 06 Nov 2007 18:28 GMT
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"));

Signature

KARL DEWEY
Build a little - Test a little

> Hello,
>
[quoted text clipped - 8 lines]
>
> Thanks!!!
Stockwell43 - 06 Nov 2007 19:19 GMT
Hi Karl,

Worked like a gem, thank you!!!!

> Try this --
> SELECT YourTable.Branches, YourTable.YourFieldName
[quoted text clipped - 15 lines]
> >
> > Thanks!!!
George Nicholson - 06 Nov 2007 19:17 GMT
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));

Signature

HTH,
George

> Hello,
>
[quoted text clipped - 9 lines]
>
> Thanks!!!
Stockwell43 - 06 Nov 2007 19:25 GMT
Excellent! Thank you very much for your help, I'll save this with my other
access instructions for future reference.

> In design view:
> [Branch] criteria: In('061', '02', '43', '88', '33')
[quoted text clipped - 17 lines]
> >
> > Thanks!!!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.