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

Report labeling from combo box

Status
Not open for further replies.

McFestoe

Technical User
Dec 16, 2003
145
GB
I haeve a combo box on a form that the use selects the month they wish to run a report for, the report runs but i cant get it to display on the report the month it is run for. and i just cant get it to put the month form one of the field due to their are four months and the report could be run for september but september could be in month1, month2, month3, or month4.

Is there a way to take the the vaule of the combo box and print it on the report?

Thanks
 
It can definitely be done, but the best way depends on whether the form is still open when the report runs.

If the form is still open, you should just be able to set the report control's Control Source to "=Forms![<form name>]![<control name>]"

Otherwise, let the form's Close event (or may an OK command button's Click event) store the value of the text box in a Public variable in a standard module. Then set the report control's Control Source property to an expression that calls a VBA function that simply returns the value from the public variable.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top