473,398 Members | 2,335 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,398 software developers and data experts.

Is it Possible to Output Query Parameters into Report Title?

Good Morning,

I have a report populated by a query with a date range parameter (begin/end date). Is there a way to output the selected date range into the report title (i.e., include the selected begin and end date by the user into the report title).

I haven't been able to figure out how to do this, since the parameters are not saved.

Thank you in advance.
Suzanne
Aug 15 '13 #1

✓ answered by zmbd

Yes, you could do so in V97 and V2000 I don't know of any reason you can't still do so in the newest versions:
Display a criteria parameter in an Access report(V97+V2000)
A parameter query is a query that when run displays its own dialog box prompting you for information, such as criteria for retrieving records or a value you want to insert in a field. Parameter queries are handy when used as the basis for reports. For example, you can create a regional earnings report based on a parameter query. When you print the report, Access displays a dialog box asking for the country or region that you want the report to cover. You enter a country or region and Access prints the appropriate report. You can also display and print a parameter from the report's underlying query in the report.

To display the criteria for a report in the report header
1.Create the criteria parameters in the report's underlying query.
For more information about creating criteria parameters in a query, type create parameter query in the Office Assistant or on the Answer Wizard tab in the Help window, and then click Search.

2.Open the report in Design view.
3.Create an unbound text box for each parameter you want to display. Click the Text Box tool in the toolbox, and then click in the report header.
4.To display the property sheet, make sure the text box is selected, and then click Properties on the toolbar.
5.Set the ControlSource property to the parameter(s) you specified in the Criteria cell in the query; type each parameter exactly as it appears in the query, and be sure to include the square brackets.
6.To see the criteria, print or preview the report. Access displays a dialog box asking for the parameter value, and then displays the parameter value you entered in the report header.
Please do the following:
If this works, let us know :)
and click on the link above and click [yes] it helped so that they will keep the article available.
thnx
-z

[Edit] In case this doesn't work: I will often use a form to get the values for the parameters. I then hide the form and reference the form's control values.

2 5149
zmbd
5,501 Expert Mod 4TB
Yes, you could do so in V97 and V2000 I don't know of any reason you can't still do so in the newest versions:
Display a criteria parameter in an Access report(V97+V2000)
A parameter query is a query that when run displays its own dialog box prompting you for information, such as criteria for retrieving records or a value you want to insert in a field. Parameter queries are handy when used as the basis for reports. For example, you can create a regional earnings report based on a parameter query. When you print the report, Access displays a dialog box asking for the country or region that you want the report to cover. You enter a country or region and Access prints the appropriate report. You can also display and print a parameter from the report's underlying query in the report.

To display the criteria for a report in the report header
1.Create the criteria parameters in the report's underlying query.
For more information about creating criteria parameters in a query, type create parameter query in the Office Assistant or on the Answer Wizard tab in the Help window, and then click Search.

2.Open the report in Design view.
3.Create an unbound text box for each parameter you want to display. Click the Text Box tool in the toolbox, and then click in the report header.
4.To display the property sheet, make sure the text box is selected, and then click Properties on the toolbar.
5.Set the ControlSource property to the parameter(s) you specified in the Criteria cell in the query; type each parameter exactly as it appears in the query, and be sure to include the square brackets.
6.To see the criteria, print or preview the report. Access displays a dialog box asking for the parameter value, and then displays the parameter value you entered in the report header.
Please do the following:
If this works, let us know :)
and click on the link above and click [yes] it helped so that they will keep the article available.
thnx
-z

[Edit] In case this doesn't work: I will often use a form to get the values for the parameters. I then hide the form and reference the form's control values.
Aug 15 '13 #2
Thanks so much!!!!!!
Aug 15 '13 #3

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

Similar topics

1
by: longtim | last post by:
I have been having endless difficulty creating reports/queries that set any relevent parameters from controls in forms. I am creating an application under access 2003 but will target access...
2
by: amith.srinivas | last post by:
Hi all, From a word macro in VBA, I am trying to create a report in access DB. The report is based on a query with a parameter. I am using Set rpt = Application.CreateReport rpt.RecordSource =...
5
by: ric_deez | last post by:
Hi there, I would like to create a simple search form to allow users to search for a job number based on a number of parameters. I think I understand how to use parameteres associated with Stored...
4
by: amorphous999 | last post by:
I am running Access 2002. I have some reports I would like to be able to run from VBA or interactively. The reports use queries with parameters. When the user runs the report, the parameter...
6
by: sunil | last post by:
I have a button named Button1, and I wrote an event handler for the OnClick event. protected void Button1_Click(object sender, System.EventArgs e) { this.Response.Redirect("Default.aspx?q=" +...
5
by: dana1 | last post by:
Hello Experts! Does anyone know if there is a way to set the values of query parameters from VBA for a report's recordsource? (i.e., I want to set the values of the parameters and NOT have the...
17
by: NeoAlchemy | last post by:
I am starting to find more web pages that are using a query parameters after the JavaScript file. Example can be found at www.opensourcefood.com. Within the source you'll see: <script...
2
by: sara | last post by:
I am helping a non-profit track their elder clients and care given to the clients. The organization would like a report that shows various info on ALL clients, such as: # in each town, # and...
2
by: raaman rai | last post by:
i have 3 drop dropdown box which is used for searching my database. Either one of them can be selected to perform the search but if none of them is selected it will give an error. Well in reference...
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: 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...
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
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...
0
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,...

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.