PhoenixofMT
Part-time Access Guru
- Local time
- Yesterday, 18:40
- Joined
- Jul 23, 2008
- Messages
- 35
I have a button on my form that I want to change color depending on some other value on the form. With the plethora of properties involved in doing this, is there something like the format painter that I can use in VBA? My plan was to copy the properties from other butons:
but this is taking forever and I'm running the risk of missing a property (I found stuff with IntelliSense I don't see in the properties window).
I'm thinking I may just have to stack two buttons with different formatting, show/hide them, and have them call the same code.
Any advice?
Code:
With Me.cmdCalibrate
Select Case Mode
Case 1
.BackColor = Me.cmdUpdateCal.BackColor
.BorderShade = Me.cmdUpdateCal.BorderShade
.BorderStyle = Me.cmdUpdateCal.BorderStyle
.BorderThemeColorIndex = Me.cmdUpdateCal.BorderThemeColorIndex
.BorderTint = Me.cmdUpdateCal.BorderTint
.BorderWidth = Me.cmdUpdateCal.BorderWidth
.HoverColor = Me.cmdUpdateCal.HoverColor
.HoverForeColor = Me.cmdUpdateCal.HoverForeColor
.HoverForeShade = Me.cmdUpdateCal.HoverForeShade
.HoverForeThemeColorIndex = Me.cmdUpdateCal.HoverForeThemeColorIndex
.HoverForeTint = Me.cmdUpdateCal.HoverForeTint
.HoverShade = Me.cmdUpdateCal.HoverShade
.HoverThemeColorIndex = Me.cmdUpdateCal.HoverThemeColorIndex
.HoverTint = Me.cmdUpdateCal.HoverTint
...
I'm thinking I may just have to stack two buttons with different formatting, show/hide them, and have them call the same code.
Any advice?