Go Back   Access World Forums > Microsoft Access Discussion > Queries

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 07-30-2014, 06:15 AM   #1
rodrigoturbina
Newly Registered User
 
Join Date: Jul 2014
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
rodrigoturbina is on a distinguished road
multiple filter criteria on same field

Hi everyone this is Rod, I am using MS Access 2007.

I would like to display a report based on the table called "expenses", filtered by:
- "from" (datefrom field) and "to" (dateto field) date on "payment date" field;
- multiple criteria on same field called "payment method" (I would like to include only payment methods "check" and "credit card", but not the other payment methods in the field, such as "cash", "transfer", etc.)

For that end I made a query based on the table "expenses", and in the "payment date", in the criteria field, I entered:

between [form]![formname]![datefrom] and [form]![formname]![dateto]

This works fine so far, however when I attempt to add multiple criteria on the "payment method" field, it does not filter accurately any longer. In the same row of the criteria field where I completed the date criteria, I enter "check". In the next row, same field, I enter "credit card".

Since it doesn´t work, I tried putting both arguments in the same line as the date criteria (always in the payment method field) as: "check" and "credit card" but still does not work (now it filters the payment method correctly, but the dates filter appear as if I have never completed them).

Hope you can provide some help here
Thanks in advance
Rod

rodrigoturbina is offline   Reply With Quote
Old 07-30-2014, 06:27 AM   #2
pbaldy
Wino Moderator
 
pbaldy's Avatar
 
Join Date: Aug 2003
Location: Nevada, USA
Posts: 33,372
Thanks: 13
Thanked 4,120 Times in 4,052 Posts
pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold
Re: multiple filter criteria on same field

In the same line as the date criteria try

In("check", "credit card")
__________________
Paul
Microsoft Access MVP 2007-2019

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
pbaldy is offline   Reply With Quote
Old 07-30-2014, 06:30 AM   #3
rodrigoturbina
Newly Registered User
 
Join Date: Jul 2014
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
rodrigoturbina is on a distinguished road
Re: multiple filter criteria on same field

That worked! thanks so much for the prompt response, Paul

rodrigoturbina is offline   Reply With Quote
Old 07-30-2014, 06:35 AM   #4
pbaldy
Wino Moderator
 
pbaldy's Avatar
 
Join Date: Aug 2003
Location: Nevada, USA
Posts: 33,372
Thanks: 13
Thanked 4,120 Times in 4,052 Posts
pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold pbaldy is a splendid one to behold
Re: multiple filter criteria on same field

Happy to help Rod!
__________________
Paul
Microsoft Access MVP 2007-2019

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
pbaldy is offline   Reply With Quote
Reply

Tags
criteria , field , filter , multiple , query

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Form to filter multiple criteria morganth Forms 4 06-20-2014 08:12 AM
Multiple Criteria Filter Chalkie42 Forms 6 05-19-2013 08:30 AM
[SOLVED] Multiple Filter Criteria! mcmcom General 4 08-20-2003 10:13 AM
Filter using multiple criteria Maestro Forms 4 11-08-2001 02:26 PM
Multiple Filter Criteria FranD Modules & VBA 2 11-16-2000 04:49 AM




All times are GMT -8. The time now is 07:45 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World