Print Parameters from Combo Box on Report

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
 
M

Marshall Barton

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)
 
D

Duane Hookom

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.
 
S

Scott A

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top