473,769 Members | 2,143 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Apply Filter to A Report

I already have a report designed under Reports. When I use filtering in Forms
or Tables, I see no way to select that filtered list when I am in Reports, and
there appears to be no way to do the filtering when I am in Reports.

I have received two replies to this message, posted a few days ago within
another Subject. One requires making programming type statements. That should
not be necessary -- Access must have a quick way to just click on something to
apply the filter to my already formatted report layout. The other reply said to
base the report on a query -- it appears to me I can only do that if I then
create a new report.

Thanks to anyone who can give me the simple instructions that must be in
Access, but sure are not in the Help menus.

Neil
Cat Paintings At Carol Wilson Gallery
http://www.carolwilsongallery.com
Nov 13 '05 #1
16 18419
On 11 Nov 2004 19:52:27 GMT, Nhmiller wrote:
I already have a report designed under Reports. When I use filtering in Forms
or Tables, I see no way to select that filtered list when I am in Reports, and
there appears to be no way to do the filtering when I am in Reports.

I have received two replies to this message, posted a few days ago within
another Subject. One requires making programming type statements. That should
not be necessary -- Access must have a quick way to just click on something to
apply the filter to my already formatted report layout. The other reply said to
base the report on a query -- it appears to me I can only do that if I then
create a new report.

Thanks to anyone who can give me the simple instructions that must be in
Access, but sure are not in the Help menus.

Neil
Cat Paintings At Carol Wilson Gallery
http://www.carolwilsongallery.com

Are you using a form, and filtering the records using the "Filter by
Selection" or "Filter by Form" tool buttons?

If so, Add a command button to the form.
Code it's Click event:
DoCmd.OpenRepor t "ReportName ", acViewPreview , , Me.Filter

Filter the records on the form, then click the button.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #2
>Are you using a form, and filtering the records using the "Filter by
Selection" or "Filter by Form" tool buttons?
Yes, Filter By Selection

If so, Add a command button to the form.
Code it's Click event:
DoCmd.OpenRepo rt "ReportName ", acViewPreview , , Me.Filter
My report is called Roster. Do I just substitute "Roster" for "ReportName "? I
tried that and nothing happened after I continued as below:

Filter the records on the form, then click the button.


Do you know what I did wrong? Also, how would anyone know to use a statement
like that? I'm surprised Microsoft does not have an easy way to accomplish this
task.

Thanks.

Neil
Cat Paintings At Carol Wilson Gallery
http://www.carolwilsongallery.com
Nov 13 '05 #3
>Are you using a form, and filtering the records using the "Filter by
Selection" or "Filter by Form" tool buttons?
Yes, Filter By Selection

If so, Add a command button to the form.
Code it's Click event:
DoCmd.OpenRepo rt "ReportName ", acViewPreview , , Me.Filter
My report is called Roster. Do I just substitute "Roster" for "ReportName "? I
tried putting the statement in the Event Tab but the characters wouldn't
appear.

Filter the records on the form, then click the button.


Do you know what I did wrong? Also, how would anyone know to use a statement
like that? I'm surprised Microsoft does not have an easy way to accomplish this
task. Perhaps if you could instruct me on this with me using the Wizard button
in conjunction with placing the Command button in my form, that might be
easier.

Thanks.

Neil
Cat Paintings At Carol Wilson Gallery
http://www.carolwilsongallery.com
Nov 13 '05 #4
On 11 Nov 2004 21:41:35 GMT, Nhmiller wrote:
Are you using a form, and filtering the records using the "Filter by
Selection" or "Filter by Form" tool buttons?


Yes, Filter By Selection

If so, Add a command button to the form.
Code it's Click event:
DoCmd.OpenRep ort "ReportName ", acViewPreview , , Me.Filter


My report is called Roster. Do I just substitute "Roster" for "ReportName "? I
tried putting the statement in the Event Tab but the characters wouldn't
appear.

Filter the records on the form, then click the button.


** snipped **

When you have added the command button to the form, display it's
property sheet.
Click on the Event tab.
On the Click line write:
[Event Procedure]
Then click on the button with 3 dots that appears on that line.
When the code window opens, the cursor will be flashing between 2
already existing lines of code.
Between those 2 lines, write:

DoCmd.OpenRepor t "Roster", acViewPreview , , Me.Filter

Exit the code window and save the changes.
Open the Form. Filter the records using one of the filter tool
buttons. Click the command button.
The Roster report will open, with just the filtered records.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #5
>** snipped **

When you have added the command button to the form, display it's
property sheet.
Click on the Event tab.
On the Click line write:
[Event Procedure]
Then click on the button with 3 dots that appears on that line.
When the code window opens, the cursor will be flashing between 2
already existing lines of code.
Between those 2 lines, write:

DoCmd.OpenRepo rt "Roster", acViewPreview , , Me.Filter

Exit the code window and save the changes.
Open the Form. Filter the records using one of the filter tool
buttons. Click the command button.
The Roster report will open, with just the filtered records.


Thank you. That worked. I gather there are several ways of accomplishing this
same task. An earlier reply on another Subject said to do it through a query.
What I am concerned about is how does a user, who expects Windows software to
be user friendly, know how to create code like yours? For comparison, the 1994
version of Lotus Approach requires nothing like this -- all tasks are done from
commands in dropdown menus, and apply universally to all views of a database.
Could you explain to me why Access is so code oriented? When I read the Help
topics, I have no clue what they are talking about or how to do what they are
saying. And I am a software engineer, though only as part of my work and on a
lower level.

Neil
Cat Paintings At Carol Wilson Gallery
http://www.carolwilsongallery.com
Nov 13 '05 #6
Nhmiller wrote:
** snipped **

When you have added the command button to the form, display it's
property sheet.
Click on the Event tab.
On the Click line write:
[Event Procedure]
Then click on the button with 3 dots that appears on that line.
When the code window opens, the cursor will be flashing between 2
already existing lines of code.
Between those 2 lines, write:

DoCmd.OpenRep ort "Roster", acViewPreview , , Me.Filter

Exit the code window and save the changes.
Open the Form. Filter the records using one of the filter tool
buttons. Click the command button.
The Roster report will open, with just the filtered records.

Thank you. That worked. I gather there are several ways of accomplishing this
same task. An earlier reply on another Subject said to do it through a query.
What I am concerned about is how does a user, who expects Windows software to
be user friendly, know how to create code like yours? For comparison, the 1994
version of Lotus Approach requires nothing like this -- all tasks are done from
commands in dropdown menus, and apply universally to all views of a database.
Could you explain to me why Access is so code oriented?


Flexibility. Expandability.

Many tasks are repetitious. Many aren't.
When I read the Help topics, I have no clue what they are talking about or how to do what they are
saying. And I am a software engineer, though only as part of my work and on a
lower level.

Neil
Cat Paintings At Carol Wilson Gallery
http://www.carolwilsongallery.com

Nov 13 '05 #7
>DoCmd.OpenRepo rt "Roster", acViewPreview , , Me.Filter

Would you be able to tell me where in Access (Help or otherwise) there is an
explanation of this command, and if there is a Help section with instructions
about writing code for the various needs you have run into? Thanks.

Neil
Cat Paintings At Carol Wilson Gallery
http://www.carolwilsongallery.com
Nov 13 '05 #8
nh******@aol.co mnojunk (Nhmiller) wrote in message news:<20******* *************** *****@mb-m25.aol.com>...
I already have a report designed under Reports. When I use filtering in Forms
or Tables, I see no way to select that filtered list when I am in Reports, and
there appears to be no way to do the filtering when I am in Reports.

I have received two replies to this message, posted a few days ago within
another Subject. One requires making programming type statements. That should
not be necessary -- Access must have a quick way to just click on something to
apply the filter to my already formatted report layout. The other reply said to
base the report on a query -- it appears to me I can only do that if I then
create a new report.

Thanks to anyone who can give me the simple instructions that must be in
Access, but sure are not in the Help menus.

Neil
Cat Paintings At Carol Wilson Gallery
http://www.carolwilsongallery.com


The other reply said to base the report on a query -- it appears to
me I can only do that if I then create a new report.

Not so. Create the query. Then change the 'Record Source' property of
the existing report to the name of the query.

HTH

Sunil Korah
Nov 13 '05 #9
>Create the query. Then change the 'Record Source' property of
the existing report to the name of the query.


I created the query using the query wizard. I selected all the fields, then did
a filter by selection on one of the fields. When I go to the report tab and
right click on the report name, then click on properties, there is just a
general tab and a window to enter descriptive information. Where is Record
Source? Thanks.

Neil
Cat Paintings At Carol Wilson Gallery
http://www.carolwilsongallery.com
Nov 13 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1391
by: MaryD | last post by:
Is there any way to use the enter key - or a function key - as the Apply Filter when a form is opened in FilterByForm mode? I can see the value of function keys and the enter key when the form is open in Normal mode using the key down event but this does not work when the form is opened in filterbyform mode. Thank you for you help, MaryD
4
2610
by: Iyhamid | last post by:
Hi I am looking for codes to filter and apply filter to my data base using access
3
16956
by: mattscho | last post by:
Hi All, Trying to create a set of 3 buttons in a form that have the same effect as the "Filter by Form", "Apply Filter" and "Remove Filter" Buttons on the access toolbar. Help would be muchly appreciated. Cheers.
1
6059
by: mattscho | last post by:
Re: Filter By From, Apply Filter, Remove Filter Buttons in a Form. -------------------------------------------------------------------------------- Hi All, Trying to create a set of 3 buttons in a form that have the same effect as the "Filter by Form", "Apply Filter" and "Remove Filter" Buttons on the access toolbar. Help would be muchly appreciated. Cheers. In the Click() Event of 3 Command Buttons, place the following code: Code: (...
2
11258
by: Nhoung Ar | last post by:
Can anybody out there help me please on apply filter in MS Access. I have a form that create from the query, which contain field chidid (text field), in the form footer, I add the button to open another form (searchF form), which have an unbound text box (text1). It works fine with this code: DoCmd.ApplyFilter , "childid='" & Form_SearchF.Text1 & "'" But if I change the data type of childid field to number it does't work. The error...
3
10957
by: Supermansteel | last post by:
I am trying to run a Apply filter for everytime someone opens Form_CC it will only show the Test (Test_ID) they are working on. This seems to be the closest I have gotten to filtering it correctly, however it doesn't work when the form is opened. Is there something I am doing wrong on this? Private Sub Form_Open(Cancel As Integer) DoCmd.ApplyFilter Form_CC.Form.filter = "Test_ID = 28" Form_CC.Form.FilterOn = True End Sub
1
3143
by: eHaak | last post by:
A couple years ago, I built a database in MS Access 2003. I built the form using macros in some of the command buttons, and now I’m trying to eliminate the macros and just use visual basic code. I’ve been successful in doing this for most of the buttons, but I’m having trouble reprogramming some Apply Filter buttons on one form and could use some help. So I have a Contacts List form that lists all of the division’s staff members...
3
2690
by: dbdb | last post by:
hi guys need your suggestion how can i apply filter for my date variable data type i have a form name transaction and i have a text box on it named : start and finish i need to apply filter my data using that 2 data. i have to view data for the transaction date between start and finish date.
10
15196
by: dbdb | last post by:
Hi, i create a chart in ms access based on my query, then i want my chart when is it open is only show value based on my criteria. i'll try to used it in the properties apply filter using the expression, it didn't work. the chart still viewing all data. and i used the event "on open" and used "applyfilter" command then it shown an error. "that the report isn't bound with the query"
0
9422
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10038
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9987
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9857
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8867
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5294
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3952
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3558
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.