Print Parameters from Combo Box on Report

  • Thread starter Thread starter ScottA
  • Start date Start date
S

ScottA

I've been able to print parameters on my reports when the
parameters are passed using text boxes (on a form).

I've got a vew QBFs with combo box controls. When I try
to print these parameters on the report, I only get the
numbers, and not the lookup values displayed in the combo
boxes.

Here's a sample of what I mean:

I've got a control on the report with Control Source=
[Forms]![dlgDateParameter2]![cboDept]

But the unbound combo control that provides the data has a
Row Source that looks up the values from another table,
Row Source = SELECT [tblDepartments].[DeptID],
[tblDepartments].[DeptCode] FROM [tblDepartments]

Any Ideas?

Thanks,

Scott
 
ScottA said:
I've been able to print parameters on my reports when the
parameters are passed using text boxes (on a form).

I've got a vew QBFs with combo box controls. When I try
to print these parameters on the report, I only get the
numbers, and not the lookup values displayed in the combo
boxes.

Here's a sample of what I mean:

I've got a control on the report with Control Source=
[Forms]![dlgDateParameter2]![cboDept]

But the unbound combo control that provides the data has a
Row Source that looks up the values from another table,
Row Source = SELECT [tblDepartments].[DeptID],
[tblDepartments].[DeptCode] FROM [tblDepartments]

If you want to display the combo's second column, you can
use:
=[Forms]![dlgDateParameter2]![cboDept].Column(1)
 
You could change the text box on your report to a combo box. Set it up
similar to the one on your form. YOu could also add a text box on your form
with a control source:
=cboDept.Column(1)
On your report, reference this text box rather than the combo box.
 
Thanks, Marsh -

This worked perfectly!

Scott
-----Original Message-----
ScottA said:
I've been able to print parameters on my reports when the
parameters are passed using text boxes (on a form).

I've got a vew QBFs with combo box controls. When I try
to print these parameters on the report, I only get the
numbers, and not the lookup values displayed in the combo
boxes.

Here's a sample of what I mean:

I've got a control on the report with Control Source=
[Forms]![dlgDateParameter2]![cboDept]

But the unbound combo control that provides the data has a
Row Source that looks up the values from another table,
Row Source = SELECT [tblDepartments].[DeptID],
[tblDepartments].[DeptCode] FROM [tblDepartments]

If you want to display the combo's second column, you can
use:
=[Forms]![dlgDateParameter2]![cboDept].Column(1)
 
Back
Top