Changing row color depending on value of a field

crododo

Registered User.
Local time
Today, 12:52
Joined
May 2, 2013
Messages
27
Hi,

I have this code that should change backgroundcolor in multiple items form based on a value of a field:
Private Sub Form_Current()
'check if field on form called somefield is DVD
If Me.TYPE.Value = "DVD" Then
Detail.BackColor = vbRed 'DVD
Else
Detail.BackColor = 16777215 'BOOK
End If
End Sub

But it does not work, any idea what can I do?

Thx
 
By "multiple items form" I assume you mean Continuous Forms.

It can't be done in Continuous Forms.

All that is available to you is Conditional Formatting.

BTW Type is a reserved words and best avoided for any names.
 

Users who are viewing this thread

Back
Top Bottom