473,394 Members | 1,567 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Filter reports

Is it possible to open and filter a REPORT based on a criteria as you would a form?

If so would command be similar to:

Private Sub OpenReport_Click()
On Error GoTo Err_ViewDev_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "REPORT"

stLinkCriteria = "[siteID]=" & Me![siteID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_ViewDev_Click:
Exit Sub

Err_ViewDev_Click:
MsgBox Err.Description
Resume Exit_ViewDev_Click

End Sub
Jun 4 '07 #1
2 1264
JConsulting
603 Expert 512MB
Is it possible to open and filter a REPORT based on a criteria as you would a form?

If so would command be similar to:

Private Sub OpenReport_Click()
On Error GoTo Err_ViewDev_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "REPORT"

stLinkCriteria = "[siteID]=" & Me![siteID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_ViewDev_Click:
Exit Sub

Err_ViewDev_Click:
MsgBox Err.Description
Resume Exit_ViewDev_Click

End Sub

pretty much yes...except you would change openform to openreport.

for access versions after 2002 I think you're allowed to pass criteria to a report
J
Jun 4 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
pretty much yes...except you would change openform to openreport.

for access versions after 2002 I think you're allowed to pass criteria to a report
J
You can do it in Access 2000
Jun 6 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Baz'noid | last post by:
Hi all, With the recent postal strikes here in the UK i'm trying to persuade access to email reports at the touch of a button. I've not been able to figure out how to filter the report - when i...
3
by: Afton | last post by:
I would like to make a form that filters a report by Supervisor and by starting and ending date. I have the supervisors in a combo box, and that works. However, I do not know how to code to let...
4
by: Nhmiller | last post by:
This is directly from Access' Help: "About designing a query When you open a query in Design view, or open a form, report, or datasheet and show the Advanced Filter/Sort window (Advanced...
16
by: Nhmiller | last post by:
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...
1
by: Eli via AccessMonster.com | last post by:
I have a database of accepted and not accepted reports. If a report is accepted...there is a check box that is marked to show acceptance. When I run a query of "accepted reports" I get a number of...
2
by: Thall | last post by:
Hey Gurus - I've seen a few solutions to this problem, but none of which I can do without a little help. Here's the situation The following code loops thru a sales report, using the sales rep ID...
15
by: scatterbrain | last post by:
I'm trying to create a popup form so that my peers have and easy way to filter information by 4 categories: Presenter, Evaluator, Date, or Topic. All this information is stored in my Data table and I...
1
by: Cara Murphy | last post by:
Hi There! Hoping you are able to help me with a filtering scenario: I have created a pop up form (Filter) to filter a report (Open Issues), which currently has a number of combo boxes which...
5
by: DAHMB | last post by:
Hi all, Using Access 2007 I have a report called Sunday School Attendance based on a Query called qryAttendance the query is as follows: SELECT tblSundaySchoolAttendance.StudentID,...
5
by: DAHMB | last post by:
I have a report that I filter on the fly the following is my code, it worked before but now I added a checkbox to the filter process. I don't know how to write the code properly for the checkbox...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.