Toggle Button Text Color

M

Michael

One way to do this is using VBA. Create a Sub called
ToggleColor...

Sub ToggleColor()
Select Case (Name of Option Group) ;for example Frame7
Case 1
Toggle8.ForeColor=vbRed
Toggle9.ForeColor=vbBlack
Toggle10.ForeColor=vbBlack
Toggle24.ForeColor=vbBlack
Toggle11.ForeColor=vbBlack
Toggle14.ForeColor=vbBlack
Toggle12.ForeColor=vbBlack
Case 2
(Copy Case 1 to Case 2 through Case 7 making sure that
the desired Toggle in each Case is set to vbRed i.e.
Toggle9 in Case 2 should be vbRed and the rest of the
Toggles vbBlack, Toggle 10 in Case 3 should be vbRed and
the rest vbBlack and so on...)

Case Else
(all Toggles here should be vbBlack)


Now create two additional subs:

One for the Option Group BeforeUpdate event and one for
the Form Current event. In each of the sub you will call
ToggleColor.

For example if your option group was named Frame7

Sub Frame7_BeforeUpdate(Cancel as Integer)
ToggleColor
End Sub

Sub Form_Current()
ToggleColor
End Sub


Hope this helps!
 
G

Guest

this looks like exactly what i was looking for. i hope it works as user
scrolls or otherwise moves record-to-record.

ted
 

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