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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User Input for Report Headings

Status
Not open for further replies.

dhanson

IS-IT--Management
Dec 10, 2003
9
0
0
US
I have a report that is printed monthly and I'm trying to find a way in which the user can input what month he/she wants to see in the header of the report. I can't pull this info from anywhere on the screen so that's why the users must input the month themselves. I can't use a text box from a table becuase the value changes for each record and if I use an unbound text box it prompts the user for a value every time the report is opened. Any suggestions on how to make a label or text box in the header of a report that allows the user to change it at his/her will?
 
If you don't want the current Mounth(), you will have to pass it from a form. Try a combobox on a small form with all 12 months listed.
 
Add a parameter to your query i.e. [Enter month for report]. This will prompt the user to enter the month. Then add a label to the header of the report with the control source of the expr you added to the query......
 
Actually, add the parameter like CosmoKramer said, but in the report add a TEXT box, not label, and put in the control source =[Enter month for report]

if you want to add more text, like "Records for December" then just concatenate the rest of the unchanging text. ="Records for"&" "&[Enter month for report]

Take Care, Dawn
 
If you use a combo box on a form, the name of the month will be [combobox].value. You'll have to assign it to a global function to transfer it to the report header. The number of the month will be [combobox].listindex +1, which will give you the criteria for your query. Once you set up something like this, it will come in handy over and over.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top