Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print parameter values on a report 1

Status
Not open for further replies.

RenaG

Programmer
May 3, 2011
132
US
I am working in Access 2007. I am also a fairly new Access user.

I have a report whose record source is a query that needs parameters (beg date and end date). I need to be able to display these dates on the report. I found another thread (that is closed now) explaining how to do this. These are the steps it listed:
(1) Make a form that has textboxes for you to input the values of the parameters you will use for your query. Label the textboxes appropriately so users know what they're entering.

(2) Put a command button on the form that calls the report you want.

(3) In the query, make sure the parameters are pointing the textboxes on the form (e.g., forms![formname]![textbox]).

(4) In the report, where you want to reference the values of the parameters, just make the same reference as you did in the query: forms![formname]![textbox]

(5) Once you've set it up this way, the report should be opened only by opening the form and clicking on the command button.

I have gotten up to step 3. But when I run the form, it shows #Name? in the textbox. How do I fix that?

TIA,
~RLG
 
Hi Duane,

Thanks for getting back to me. Yes, I set the report up that way but the problem I am having is in the form that collects the parameter information. In the Control Source on the form for the beginning date is:
[Enter BeginningDate: ]

I just changed it to:
BeginningDate

Both values display as #Name? when I display the form in Form View.

So I need help to get the form set up correctly.

TIA,
~RLG
 
The controls should be unbound, ie NO control source ...

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Whoo! Hoo! That did the trick. Thanks so much!!!

Gratefully,
~RLG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top