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!

Passing value from a form Combobox to a Report 1

Status
Not open for further replies.

Sloaner

Technical User
Jun 21, 2004
39
US
I have a form with a button that calls a report.The form prompts for companyName and for ordertype(2 comboboxes).I would like to know how to pass the value of the ordertype combobox to my report. The report controlsource is a query. In that query I have the ordertype as
Code:
Label_ContainerType: [LabelTypeName] & " " & [ContainerTypeName]

In my report is a textbox field whose recordsource I made same as above in order to print the data being passed.
Code:
Label_ContainerType: [LabelTypeName] & " " & [ContainerTypeName]
unfortunately the report prints out the field blank.

Any suggestions on how to handle this problem anyone???

Thanks in advance.
 
Actually the field in my report has the following as controlsource

Code:
=([LabelTypeName] & " " & [ContainerTypeName])
 
Just identify the control source property as the name: Label_ContainerType. You see if the name you need is in your RecordSource and has a named alias then just refer to that name. No need to refer back to the ComboBox in the form.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top