S
Scott
I'm trying to set a form's header, detail and footer's backcolor with code
below from a button. When I click my button "cmdColor", I get an "Overflow"
error on the line:
frmHeaderBackColor = 6643753
What am I doing wrong? Do I need to declare my colors as a different type?
CODE ************************
Private Sub cmdColor_Click()
Call SetFormBackColors(Me.Form)
End Sub
Function SetFormBackColors(frmAny As Form)
Dim frmHeaderBackColor As Integer, frmFooterBackColor As Integer,
frmDetailBackColor
frmHeaderBackColor = 6643753
frmFooterBackColor = 16777215
frmDetailBackColor = -2147483633
frmAny.BackColor = frmDetailBackColor
MsgBox "BackColor set"
frmAny.FormHeader.BackColor = frmHeaderBackColor
MsgBox "FormHeader.BackColor Set "
frmAny.FormFooter.BackColor = frmFormFooterBackColor
MsgBox "FormFooter.BackColor Set "
End Function
below from a button. When I click my button "cmdColor", I get an "Overflow"
error on the line:
frmHeaderBackColor = 6643753
What am I doing wrong? Do I need to declare my colors as a different type?
CODE ************************
Private Sub cmdColor_Click()
Call SetFormBackColors(Me.Form)
End Sub
Function SetFormBackColors(frmAny As Form)
Dim frmHeaderBackColor As Integer, frmFooterBackColor As Integer,
frmDetailBackColor
frmHeaderBackColor = 6643753
frmFooterBackColor = 16777215
frmDetailBackColor = -2147483633
frmAny.BackColor = frmDetailBackColor
MsgBox "BackColor set"
frmAny.FormHeader.BackColor = frmHeaderBackColor
MsgBox "FormHeader.BackColor Set "
frmAny.FormFooter.BackColor = frmFormFooterBackColor
MsgBox "FormFooter.BackColor Set "
End Function