Solved

MS Access 2007 Multiple Filter onLoad

Posted on 2009-05-14
5
787 Views
Last Modified: 2013-11-28
Simple request.
How can you add multiple filters to a MS Access 2007 report.
I have 2 fields:
1: Print (TRUE/FALSE)
2: Select Type (TypeA, TypeB)

I want to do a simple filter when loading a report that only displays the values WHERE
[Print] = "TRUE" and [Select Type] = "TypeA"

How can I simply do this?
0
Comment
Question by:vmurray
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 5

Accepted Solution

by:
noetymology earned 500 total points
ID: 24388499
Use the recordsource of the report as
SELECT Table1.EName, Table1.Print, Table1.[Select Type]
FROM Table1
WHERE (((Table1.Print) Like "True") AND ((Table1.[Select Type]) Like "Type A"));
0
 
LVL 5

Expert Comment

by:noetymology
ID: 24388515
I have used Select Type as "Type A" with a space. You have used it without a space. So you might have to make those changes
0
 

Author Comment

by:vmurray
ID: 24388775
Didn't really get it from the query statement code... but "use the recordsource of the report" did it for me.

I ended up going to the report properties, clicking on "Record Source, ..." and adding each field.  I then added "Criteria" to the 2 fields...

ie: TRUE and "TypeA"

It automatically added the statement to the Record Source along with the selected table.  

There are too many ways to do 1 task in Access... but this is from someone who doesn't use it much.  Thanks.
0
 

Author Closing Comment

by:vmurray
ID: 31597509
The key was "recordsource of the report"... Thanks.
0
 
LVL 5

Expert Comment

by:noetymology
ID: 24388856
That is true. You could also first create a query and then use it as a recordsource for your report. Or you can use the above select statement directly as the recordsource of the report. You could also invoke the query builder by clicking on the ellipse on the recordsource property and then design the same query from the query grid. So yes there are many ways to do one task. Good Luck!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question