ComboBox as Control Source

tMitch

Registered User.
Local time
Today, 13:22
Joined
Sep 24, 2002
Messages
43
I have a report that opens from a form. The report looks to the combo box selection for the info to be displayed. I want that combo box selection to be displayed on the report, but I want column 2, not column 1.

I put a text box on the report with the control source as: = [Forms]![frmTracking]![cboActivity]. This gives me the selection I want, but column 1 (a number). If I use [Forms]![frmTracking]![cboActivity].[RowSource] it gives me the whole row (columns 1 and 2). I tried using column numbers, but that doesn't work (I am probably writing the code wrong).

How do I write the code to get only the info in the second column?

Thanks.
 
try...

[Forms]![frmTracking]![cboActivity].Column(1)

if that doesn't work then try...

[Forms]![frmTracking]![cboActivity].Column(1, 0)

For this to work, the combo's properties must be set up to show 2 columns.

For more info. search in help under column.

HTH
 
Well, that was easy. I guess I was using ...[RowSource].Column () which is why it didn't work. Thank you!
 

Users who are viewing this thread

Back
Top Bottom