Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detail Header Format

Status
Not open for further replies.

razchip

Technical User
Feb 2, 2001
133
US
I can't seem to get the detail header formatting to work in 2010, I want to turn the backcolor to yellow if the "balance" is > 80 and if "SumOfPto" <80. Whatever I do, I always get the white background.

Dim LngWhite As Long
Dim LngYellow As Long

LngYellow = RGB(255, 255, 0)
LngWhite = RGB(255, 255, 255)

If (Me![Balance] > 80 And Me![SumOfPTO] < 80) Then
Me![SumOfPTO].BackColor = LngYellow
Else
Me![SumOfPTO].BackColor = LngWhite
End If

I've done this in older versions of Access, I've tried all types of options.

Any ideas, thanks.

Thanks for the help.
Greg
 
Have you tried Conditional Formatting since it doesn't require any code?

Make sure the background is not set to Transparent.

Is the code running in the On Format event of the section of the report as the controls?

Duane
Hook'D on Access
MS Access MVP
 
Followed your advice and used conditional formatting and was able to get it to work. Thanks for pointing it out.

Thanks for the help.
Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top