Chimp8471
Registered User.
- Local time
- Today, 19:21
- Joined
- Mar 18, 2003
- Messages
- 353
I have a report which i am trying to format, I want every other row's details to alternate colour which i have done (See below)
I also have on my report, a checkbox and a text feild (not sure if i could use a rectangle and format that instead , it doesn't do anything i just need it to change colour)
chkbox name = "chkClean"
Text box name = "txtclean"
I just want the back colour to go red if the check box is true and white if the check box is false
Please help
ANdy
I also have on my report, a checkbox and a text feild (not sure if i could use a rectangle and format that instead , it doesn't do anything i just need it to change colour)
chkbox name = "chkClean"
Text box name = "txtclean"
I just want the back colour to go red if the check box is true and white if the check box is false
Please help
ANdy
Code:
Option Compare Database
Option Explicit
Private m_RowCount As Long
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
m_RowCount = m_RowCount + 1
If m_RowCount / 2 = CLng(m_RowCount / 2) Then
Me.Detail.BackColor = 15263976 'Change value to the color you desire
Else
Me.Detail.BackColor = 14811135 'Change value to the color you desire
End If
If Me.chkClean = True Then
txtclean.BackColor = 255
Else
txtclean.BackColor = 16777215
End If
End Sub