473,387 Members | 1,540 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,387 software developers and data experts.

Filter report by user input

I have a report that I'd like to filter based on the user's input. The user would select the month and year that they would like to see data from, and the report would return that data along with the selected month and year in the report header, perhaps in an unbound textbox. How would I go about getting the user input and applying the filter to the OpenReport method?

Thanks!

CB55
Apr 15 '08 #1
4 9348
n8kindt
221 100+
I have a report that I'd like to filter based on the user's input. The user would select the month and year that they would like to see data from, and the report would return that data along with the selected month and year in the report header, perhaps in an unbound textbox. How would I go about getting the user input and applying the filter to the OpenReport method?

Thanks!

CB55
i just answered a very similar post last week. CLICKY

if you have problems figuring out how to apply this to the OpenReport method, let me know
Apr 15 '08 #2
i just answered a very similar post last week. CLICKY

if you have problems figuring out how to apply this to the OpenReport method, let me know
Ok, that works, but now I have another issue. I have 3 subreports, each of which feeds from a different query. The user now needs to input the month and year three times - once for each subreport. How could I prompt the user only once and copy that response to each query?

Thanks!
Apr 16 '08 #3
Ok, that works, but now I have another issue. I have 3 subreports, each of which feeds from a different query. The user now needs to input the month and year three times - once for each subreport. How could I prompt the user only once and copy that response to each query?

Thanks!
Does anyone have any ideas on how to solve this one?

CB55
Apr 21 '08 #4
n8kindt
221 100+
Does anyone have any ideas on how to solve this one?

CB55
i'm assuming u created a form just as i did. if so, create a button on the form and place this code into the onclick event:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Continue_Click()
  2. DoCmd.OpenReport "rptYourTitle", acNormal
  3. Forms!frmYourTitle.Visible = False
  4. End Sub
this hides the form whenever u click the button. access can still access (lol) the values that were input on the form since it is being hidden--not closed.

of course, if the user tries opening the form again, you want the form to reappear so they can change the values if necessary. so in the OnLoad event paste this in there:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2. Forms!frmYourTitle.Visible = True
  3. End Sub
hope that helps.

regards,
nate
Apr 22 '08 #5

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

Similar topics

0
by: CSDunn | last post by:
Hello, I have a problem with field filtering between an Access 2000 Project form (the application is called CELDT), and the report that shows the results of the filter. Both the form and the...
3
by: Richard | last post by:
Hi, I have a form based on a table. When I filter the form I want to run a report based on the same table with the same filter as the form. No problem until I want to filter a combo box where...
8
by: dick | last post by:
I am just trying to print/report the results of a "filter by selection" which is done by right-clicking a form, filling in values, and "applying the filter." I have searched the newsgroups, and...
4
by: John Galt | last post by:
I need to save a report to an RTF and I am using OutputTo acReport: DoCmd.OutputTo acReport, stDocName, acFormatRTF, TodaysDir & "-" & "Name.rtf" This command saves the report nicely, however...
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...
1
by: lorirobn | last post by:
Hi, I have a report that works just fine. Now I would like to add the capability to choose selection criteria to limit what is displayed. I created several reports that do this, but they used...
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...
1
by: Barb.Richards | last post by:
I have created an append query that pulls information from one database, and will append the selected information into a new table. The fields are setup like 'number' 'category' 'code' 'shares' and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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.