Solved

MS Access 2007 Multiple Filter onLoad

Posted on 2009-05-14
5
773 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
The key was "recordsource of the report"... Thanks.
0
 
LVL 5

Expert Comment

by:noetymology
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

743 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

12 Experts available now in Live!

Get 1:1 Help Now