How to Make the particular text field BOLD based on the Value from query

balaryan

Registered User.
Local time
Today, 04:58
Joined
Jul 1, 2015
Messages
12
Hi All,

Good day. I am using MS Access 2007 and have a report which display the list of values (say 10 fields) from the basic SELECT * FROM table query.

I need to dynamically set the BOLD based on the particular value for the fifth field which was assigned from Query. if it doesn't match it should display normal.

E.g
If Field_5 = "Agent" then
Field_5.FontBold = True
Else
Field_5.FontBold = False
End if

I tried the aforementioned code and it dont work. ALso i tried achieve it using below listed options.

Me.Field_5.FontBold = True
Field_5.Properties("fontweight") = 700

But nothing worked. Kindly assist me.
 
I think you need the me qualifier ;
Code:
If Field_5 = "Agent" then
[COLOR="red"]Me.[/COLOR]Field_5.FontBold = True
Else
[COLOR="Red"]Me.[/COLOR]Field_5.FontBold = False
End if
 
Thanks Gasman. Your information saved me in right time. it works. :)

Thanks a ton my friend. :D:o
 
Last edited:
you can also use conditional formatting
 

Users who are viewing this thread

Back
Top Bottom