Change form header colour

  • Thread starter Thread starter Kay
  • Start date Start date
K

Kay

Hi

Im ussing access 2000 and depending on the option selected in the combo
box on my form, I want the forms colour to change.
Iv tried
If combo89.rowsource = "Cancelled" then
me.detail.backcolor = 74838474

It doesnt seem to do anything.

Anyone out there who brain seems to be ticking at this time
Anhelp is much appreciated
 
Hi

Im ussing access 2000 and depending on the option selected in the combo
box on my form, I want the forms colour to change.
Iv tried
If combo89.rowsource = "Cancelled" then
me.detail.backcolor = 74838474

It doesnt seem to do anything.

Anyone out there who brain seems to be ticking at this time
Anhelp is much appreciated


A couple of problems.
1) Your subject says you want to change the Form Header color, but
your code is trying to change the detail section color. Which is it?
2) The Combo box Rowsource is not the same as it's value.
3) The combo box value is the value of the combo box bound column
after a row has been selected.
4) Assuming the text value of "Cancelled" is the bound column
selected, then code the Combo Box AfterUpdate event:

If combo89 = "Cancelled" then
me.Detail.Backcolor = 74838474
Else
Me.Detail.Backcolor = What color do you want?
End If

If it the Form Header color you want to change, then use:
Me.Section(1).BackColor = 74838474
etc.
 
Back
Top