Form header and detail backColor error in VBA

evanark

Registered User.
Local time
Today, 09:04
Joined
Jan 4, 2013
Messages
69
A user requested a change that would change the form header and detail back ground color to white when they click the button print record and then change the color back all in one click after the record prints. I keeping getting a run time error, type mismatch on the line where to code is to be changed. Is my code wrong? The colors are numbers not vbColors. I am using Access 2007.

Code:
Me.FormHeader.BackColor = "#FFFFFF"
Me.Detail.BackColor = "#FFFFFF"
 
Hexidecimal is not the proper type for the parameter neeeded to define BackColor. It needs to be a Long Integer. The Link below describes how to convert the Hex to Long

http://support.microsoft.com/kb/161304

-- Rookie
 

Users who are viewing this thread

Back
Top Bottom