Bold Textboxes

ewong1

Eric Wong
Local time
Today, 12:32
Joined
Dec 4, 2004
Messages
96
I currently have a if statement checking for values greater than 0

if(x>0) Then
Statement
Else
EndIf

Is there a way for me to set the property Bold to the text box in the case that x >0?
 
TextBox

I'm not sure what 'x' stands for.
If it is the value of the texbox you can do the following.
In the After Update Event of the textbox put something like this:

If Me.textbox > 0 Then
Me.textbox.FontBold = 1
Else
Me.textbox.FontBold = 0
End If

'replace textbox with the actual name of the box.
 
Thanks for getting back to me - I've actually also tried using the method you mentioned. I'm not sure if it isn't working because I am using Access 97? Let me know. Thanks again!
 
Try putting this in your form fields format property:
0;[Red]-0

I just learned this one and it's pretty cool.
 
If Me.textbox > 0 Then
Me.textbox.FontBold = 1
Else
Me.textbox.FontBold = 0
End If

You will also need the code in the forms OnCurrent event.
 

Users who are viewing this thread

Back
Top Bottom