Changing Text Labels by coding

G

Guest

How do you change a Text label based from a Lookup table from another field?
For example.

Label1 : Hello
Label2 : There / You (this is a lookup table)

If a user selects "There" from the lookup table, then Label1 will change to
the word "There". So in the report, it would look like this...

"There : Hello"

And if they select "You", it would look like

"You : Hello" in the report.

Thanks,
Greg
 
G

Guest

I don't think that you can change a text label - you would need to change it
to a text box.

Change the text box to make it look like your labels -- remember to change
the text box propeties too, locked to yes and the enabled to no, so users
can't click in it and change it.

Then in the afterupdate event of your combo, you would want something like

me.TextBoxName.value = "Hello : " + me.label2.column(0)

assuming you named you combo box label2 with your desired output in the
first column and your new textbox is TextBoxName.

Bryan
 
D

Douglas J. Steele

You can change labels: you just need to refer to the label's Caption
property.

Me.Label1.Caption = Me.label2.column(0) & ": Hello"
 

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