Access Report - Format textbox based on value of another textbox.

Is it possible to have the value of one textbox underlined or not underlined based on the value in another textbox?

For example:

Property Sheet
[Item] / Format / Font Underline = Yes if [Area] = 1
[Item] / Format / Font Underline =   No if [Area] = 2

Tim
Tim313Asked:
Who is Participating?
 
Rey Obrero (Capricorn1)Commented:
try this code in the format event of the section where the textboxes are

me.item.fontunderline= (me.area=1)
0
 
RunriggerCommented:
Have you tried custom formats?
0
 
RunriggerCommented:
Cap, when does the format event get triggered?
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
Tim313Author Commented:
capricorn1,
Thanks for the solution.
Tim
0
 
RunriggerCommented:
Cap, I would appreciate feed back on the event triggers

Cheers
Dave
0
 
Rey Obrero (Capricorn1)Commented:
dave,
the Format event fires ahead of the Print event

Format occurs when access determines which data belong to what section of the report but, before access formats the section for preview or printing

print event occurs after the data in the report section was formatted, but before the section is printed
0
 
RunriggerCommented:
I see, greatly appreciated.

2 things, your response teaches me to read the question properly, I had totally neglected to identify the question related to a Report!

Secondly, one of the developers on a database my team uses has been having problems on formatting when outputting to a powerpoint slide directly from Access, particularly around negative values, which I need displaying as Red! They come out black, I wonder if this may be a possible solution to suggest to them.

As always, your advice is most welcome, thanks
Dave
0
 
Rey Obrero (Capricorn1)Commented:
hmm... when you output results to different app (excel, word) it is normal to lost the formats. i always do the formatting after i export the data using vba codes in access.
tell them to go to this link.
http://support.microsoft.com/?kbid=209960

hth
0
 
RunriggerCommented:
Thanks mate and will do
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.