report, conditionnal formattin on format on paint

nate0057

Registered User.
Local time
Today, 00:01
Joined
Oct 4, 2012
Messages
74

Hi, I'm a french student so pardon my english. The conditionnal formatting is a good thing, but someone told me that the "on format" and "on paint" functions are better. I used the conditionnal formatting with the foolowing rules :

([flagblup]=1 And [Requirement]="Blueprints") Or ([flagconp]=1 And [Requirement]="Control Plan")

It works. However I would like to use the 2 other functions mentionned above but I don't know how...
Could you help me??

Thanks a lot
 
Your English is better than my non-existent French (though my daughter speaks it quite well).

Conditional Formatting is actually the easiest way to accomplish the goal and would be my first choice. If you wanted to use VBA, it would go in the format event and would look something like:

Code:
If ([flagblup]=1 And [Requirement]="Blueprints") Or ([flagconp]=1 And [Requirement]="Control Plan") Then
  Me.TextboxName.BackColor = vbRed
Else
  Me.TextboxName.BackColor = vbWhite
End If

with the appropriate formatting of course.
 
:) Thanks to help me but your code doesnn't work and I don't know why!!!
 
It should work fine, though you'd have to put in the correct control name. Also, make sure you're opening the report in Preview mode. The format events don't fire in Report view. If that's not it, can you post the db here?
 
I don't know why it doesn't work I'm a beginner and I have to program a very complicated db. (Sorry I can't post the db here even if I would like )
May be I have to use "on format" with "On paint" or "on print". What do you think about that?
 
I've only used the Format event and never had a problem. I don't know what "doesn't work" means.
 
Someone told me to use the RGB function. Do you know how??

Thanks
 

Users who are viewing this thread

Back
Top Bottom