Eric the Viking
Registered User.
- Local time
- Today, 00:02
- Joined
- Sep 20, 2012
- Messages
- 70
Dear All
Your help would be much appreciated.
I am running Access 2003 and have a database where I have a tab form listing a series of records.
To aid user visualisation I would like to set the row background colour so that it is different depending on the value shown in TxtBox Events_place (there are 3 alternative values).
I have tried various iterations of:
Private Sub Form_Open(Cancel As Integer)
Dim Event_place As String (and Integer etc)
If Me.Event_place = "XXXXXX" Then
Me.Detail.BackColor = 16764057
Else
Me.Detail.BackColor = 16777215
End If
End Sub
Nothing seems to work. I have used this type of code to alter row height elsewhere without a problem.
Anyone any ideas where I am going wrong?
Cheers
Eric
Your help would be much appreciated.
I am running Access 2003 and have a database where I have a tab form listing a series of records.
To aid user visualisation I would like to set the row background colour so that it is different depending on the value shown in TxtBox Events_place (there are 3 alternative values).
I have tried various iterations of:
Private Sub Form_Open(Cancel As Integer)
Dim Event_place As String (and Integer etc)
If Me.Event_place = "XXXXXX" Then
Me.Detail.BackColor = 16764057
Else
Me.Detail.BackColor = 16777215
End If
End Sub
Nothing seems to work. I have used this type of code to alter row height elsewhere without a problem.
Anyone any ideas where I am going wrong?
Cheers
Eric