Set Caption Of Label On Report

S

Steve

I have a button on a form that opens a report. I need to set the caption of
several labels on the report equal to the value of a columns in comboboxes on
the form something like:

LabelOnReport.Caption = ComboboxOnForm(2)

Where the boundcolumn of the combobox is 1.

I keep getting an error message no matter what I try. How is this done?

Thanks!

Steve
 
F

Fredg

In the report's Report Header event...
If the Combo column wanted is the bound column:

LabelName.Caption = forms!FormName!ComboName

If the column wanted is NOT the bound column:

LabelName.Caption = forms!FormName!ComboName.Column(1)

Combo boxes are Zero based, so column(1) is the 2nd column.
The form must be open when the report is run
 

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