Background Colour (1 Viewer)

Iwra

Registered User.
Local time
Today, 10:36
Joined
Jul 25, 2002
Messages
15
Can anyone tell me if you can change the background colour of a form depending on a selection. The conditional formatting option allows you to change text box colours if a condition is met. Can this be done with the background colout too?
 

Rob.Mills

Registered User.
Local time
Today, 05:36
Joined
Aug 29, 2002
Messages
871
You could set that up with vba. Tell me more about the conditions it would test.
 

Iwra

Registered User.
Local time
Today, 10:36
Joined
Jul 25, 2002
Messages
15
if value in a text box equals certain colour then background colour changes to match that colour. For example Make selection from combo box selection1's colour = green so background colour of form changes to green.
 

Rob.Mills

Registered User.
Local time
Today, 05:36
Joined
Aug 29, 2002
Messages
871
First thing you need to do is create a table with two columns. First is the # that corresponds to the color. Second column is where you will type the name of the color.

Use this table as the recordsource for your combobox.

In the After Update event of the combobox type this:

dim lng as long

lng=me!ComboBoxName

me.background=lng
 

Iwra

Registered User.
Local time
Today, 10:36
Joined
Jul 25, 2002
Messages
15
Thank you Rob I will try that.
 

Users who are viewing this thread

Top Bottom