Value is bold red if = 1

amerifax

Registered User.
Local time
Today, 10:04
Joined
Apr 9, 2007
Messages
304
In my forum I have a field "Town" that I would like to stand out when the value is "1". There is only two possibilities, 1 or 2.

Bob
 
You'll have to decide which event to place this in, depending on when you want then colour changed. Maybe in the 'on open' event of the form

If Me.Town = 1 then
Me.Town.ForeColor = vbRed
else
Me.Town.ForeColor = vbBlack 'or what ever colour you like
end if

Or you could use conditional formatting and then you don't have to worry about events

Regards
SmallTime
 
If this is a Single View form the code given would need to go in to AfterUpdate event for the Town control and in the Form_Current event.

It can, as suggested, also be done using Conditional Formatting, and if it is a Continuous View or Datasheet View form, must be done this way.

Linq ;0)>
 
Thanks missinglinq.

Really nice to see your still at it. I remember you helping me out of quite a few sticky situations a few years back in another forum. Just in case I didn't say it then, Thanks so much.

Regards
SmallTime
 
>>SmallTime & missinglinq<<

Thanks loads. It works better than I could hope for.

Bob
 

Users who are viewing this thread

Back
Top Bottom