Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change font size via VB

Status
Not open for further replies.

pbrown77

Technical User
Feb 21, 2005
55
US
On the form there is a calculation that is performed as the user enters data. For some reason, users are not noticing when "Over Budget" becomes visible, red, underlined, italic and bold.

Is there a way to make the font larger?

 
Where does "Over Budget" appear?? Label?? Textbox???

Can you give us a little more information please???

Cheers

HarleyQuinn
---------------------------------
Help us to help you,
read FAQ222-2244 before posting.
 
Sorry.
It is simply a title (label) that once the field [balance] is < 0.

This is not all the code..... but gives a good idea....
if me.balance <0 then
me.title.visible = true
me.title.fontcolor = vbred
me.title.fontunderline = true
me.title.fontbold = true
me.title.fontitalic = true
----MISSING ---- FONT SIZE ------
elseif me.balance between 0 and 100 then
me.title.visible = true
me.title.fontcolor = vbblack
me.title.fontunderline = false
me.title.fontbold = true
me.title.fontitalic = false
else
me.title.visible = false
end if


I guess the color, underline, bold and italic is just not enough. I was hoping to go from a 12 to 18 or so. At first I was thinking of just setting it up and going from visible to not, but it was requested that different formatting for different conditions. Therefore, I need to write the if statements and only the <0 MUST be set up to catch the users eye and that is where the font size comes in.

 
That is just how tricky and exact you have to be. I tried foresize (since it is what does the color)
vbfontsize
vbfont
font
vbsize

But even after working on this for the past 4 hours, it took writing the post to realize I never tried

FontSize = 18

Which works!

I think I need to take a break -- I came in way toooo early today :)


Thanks everyone!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top