Combo Box Value into a Label

smirnoff

Registered User.
Local time
Today, 01:14
Joined
Apr 8, 2005
Messages
13
I have a combo box called cboWeightCheck and would like the selected value to be put into the middle of a string for a Label called lblProd.

Whenever I think im close to figuring it out and I run the report Access crashes on me.

thanks
-Ryan
 
Have had much help here and want to try to give back...so my guess would be..In the field properties>control sours>build> do the following...
"Whatever text you want here " & [field name].
Note the space after the "want here "
I hope this is what you are looking for. :)
 
Ryan,

You can use the report's OnLoad event:

Me.lblProd.Caption = Forms![YourMainForm]![cboWeightCheck]

You have to use the Forms! reference, because the combo box is not
on your form. Assuming that your form's name is "YourMainForm" and
that the form is open when the report is run.

Wayne
 
Hello smirnoff

The value from the combo box should be able to be concatenated into a string directly to the label or by doing the concatenation into a string variable first and then displaying it.

Me.lblProd.Caption="First Part of string " & Me.cboWeightCheck.value & " third part of string"

or

strMyString="First Part of string " & Me.cboWeightCheck.value & " third part of string"
Me.lblProd.Caption=strMyString

Bryan
 
I tried all that and I get an error of " You entered an expression that has no value"

I dont think I explained my problem very well. I have a field in a combo box type display on my report, and I would like to enter it into a label string.

thanks for the help.
-Ryan
 

Users who are viewing this thread

Back
Top Bottom