Can you display parameters on reports?

R

Roxana

Hello,
I have this report in Access 2007 based on a query that prompts the user to
enter 2 date parameters (beginning and end date for the report).
It runs OK, but I would like to display the 2 date-parameters on the report.
Is there a way to do that?

thank you, Roxana
 
D

Dennis

Create two text boxes on your report and set the controlsource of the boxes to
=[Enter Start Date]
=[Enter End Date]

Use exactly the same wording inside the square brackets as you used in your
query.
 
D

Duane Hookom

Dennis' answer is correct however IMHO, it is never good programming to use
parameter prompts. http://www.tek-tips.com/faqs.cfm?fid=6763. All user
interaction like this should be done through controls on forms. The only
"prompts" that I feel are acceptable are the type performed by MsgBox().

--
Duane Hookom
Microsoft Access MVP


Dennis said:
Create two text boxes on your report and set the controlsource of the boxes to
=[Enter Start Date]
=[Enter End Date]

Use exactly the same wording inside the square brackets as you used in your
query.

Roxana said:
Hello,
I have this report in Access 2007 based on a query that prompts the user to
enter 2 date parameters (beginning and end date for the report).
It runs OK, but I would like to display the 2 date-parameters on the report.
Is there a way to do that?

thank you, Roxana
 
R

Roxana

Great suggestions! Thanks. I am thinking to create a form and give the user
the option of entering a couple of parametes.
thanks
R

Duane Hookom said:
Dennis' answer is correct however IMHO, it is never good programming to use
parameter prompts. http://www.tek-tips.com/faqs.cfm?fid=6763. All user
interaction like this should be done through controls on forms. The only
"prompts" that I feel are acceptable are the type performed by MsgBox().

--
Duane Hookom
Microsoft Access MVP


Dennis said:
Create two text boxes on your report and set the controlsource of the boxes to
=[Enter Start Date]
=[Enter End Date]

Use exactly the same wording inside the square brackets as you used in your
query.

Roxana said:
Hello,
I have this report in Access 2007 based on a query that prompts the user to
enter 2 date parameters (beginning and end date for the report).
It runs OK, but I would like to display the 2 date-parameters on the report.
Is there a way to do that?

thank you, Roxana
 
T

Tony Toews [MVP]

Roxana said:
Great suggestions! Thanks. I am thinking to create a form and give the user
the option of entering a couple of parametes.

For an example, along with lots of fairly complex code, most of which
can be removed for your purposes see Microsoft Access Report Printing
Criteria Selection Form
http://www.granite.ab.ca/accsrprt.htm

I mention this because what if you want more fields on the selection
form and the users don't want to enter data in some of the selection
criteria on the form.. Things get pretty ugly quite soon in the
queries and such.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top