?
Solved

MS Access 2007 Multiple Filter onLoad

Posted on 2009-05-14
5
Medium Priority
?
788 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 1500 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

752 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