Full Version: Background Colour
UtterAccess Forums > Microsoft® Access > Access Forms
Hi Everyone

Is it possible to change the background Colour of a Main Form depending on the value selected in a Control?

My Control is named "CustomerStatusID"

Any help appreciated.
Doug Steele
The "trick" is that forms do not have background colours. Instead, they have a number of sections (Detail, Header, Footer, etc.), each of which have a background colour.

Instead of Me.BackColor = vbRed, try Me.Section(acDetail).BackColor = vbRed
Hi Doug

Well that works a treat.

I used this:-

If Me.Status.Column(1) = "Inactive" Then
Me.Section(acDetail).BackColor = vbRed

Me.Section(acDetail).BackColor = vbWhite

End If

many thanks yet again
I use that approach in my HR system. I change the header colour for people who have left.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.