Option group selection changes color of text label in form

  • Thread starter Brian Goldhammer via AccessMonster.com
  • Start date
B

Brian Goldhammer via AccessMonster.com

I have an option group at the beginning of a form with option65 value at 1
and option 67 value at 2. When the user selects option 67, I'd like a label
(Label39) on the form to change color. Some coding I've tried is as follows:

If Option67.Value = 2 Then
Label39.ForeColor = 255
Else: Label559.ForeColor = 0

End If

When I select option67 in the form, I get an error message "You've entered an
expression that has no value".

Thanks in advance for your help.
 
T

Tom Lake

Brian Goldhammer via AccessMonster.com said:
I have an option group at the beginning of a form with option65 value at 1
and option 67 value at 2. When the user selects option 67, I'd like a
label
(Label39) on the form to change color. Some coding I've tried is as
follows:

If Option67.Value = 2 Then
Label39.ForeColor = 255
Else: Label559.ForeColor = 0

End If

When I select option67 in the form, I get an error message "You've entered
an
expression that has no value".

Option67 doesn't have a value, the option group does.

Change Option67 to the name of the group.

Tom Lake
 

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