Changing background color by code

S

Steve Voorhees

I have a form that has a toggle button it. I would like to include some code
on the toggle button that if the button is 'yes' it would change the
background color of the form to one color, but if it is 'no' it would use the
default color of the form.
Right now, the default color of the detail section of the form is 13056.
I believe that I would end up using the 'On Click' event, and the code would
be along the lines of:
If Toggle104 = -1 then
(?)
Else
(?)

Could someone possibly help me in filling in the question marks?
 
M

Marshall Barton

Steve said:
I have a form that has a toggle button it. I would like to include some code
on the toggle button that if the button is 'yes' it would change the
background color of the form to one color, but if it is 'no' it would use the
default color of the form.
Right now, the default color of the detail section of the form is 13056.
I believe that I would end up using the 'On Click' event, and the code would
be along the lines of:
If Toggle104 = -1 then
(?)
Else
(?)


Me.Section(0).BackColor = 13056
or
Me.Section(0).BackColor = RGB(255,192,192) 'Pink
 
S

Steve Voorhees

Thank you. I will give that a try the next time I am sitting down to work on
the database.
 
Top