Solved

MS Access 2007 Multiple Filter onLoad

Posted on 2009-05-14
5
775 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

910 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now