VBA Formatting Datasheet

brucey54

Registered User.
Local time
Yesterday, 21:44
Joined
Jun 18, 2012
Messages
155
Hi Folks, I’m using Access 2007, I’m trying to change the colour of a field [Other] in a form to red if the field contains the following string ”Yes”

I’m using the following code but it’s not working any help would be much appreciated.


Private Sub Other_AfterUpdate()
If Me.Other = "Yes" Then
Other.BackColor = vbRed
Else
Other.BackColor = vbWhite
End If
End Sub
 
That method wouldn't really work in datasheet mode. Have you considered Conditional Formatting?
 
That method wouldn't really work in datasheet mode. Have you considered Conditional Formatting?

Yes – but I need to have at least 6 conditional formatting options and using conditional formatting function I can only have 3.
 
Then you need to get A2010/A2013 or live with 3.
 

Users who are viewing this thread

Back
Top Bottom