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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bolding Entered Currency Only

Status
Not open for further replies.

murk

Technical User
Nov 26, 2002
16
0
0
US
I have a list of premium payments in a column set as currency so $0.00 always shows. When I enter an amount for a certain premium I would like it to automatically be bold to distinquish between the amount and the $0.00.

Do I set up a query for this and if so how (in great detail please). If not, what else would work?

Thanking you in advance,

Jennifer
 
Jennifer:

Can you give some more detail on where you are entering this? I think you can probably check what the field equals and then, if it's not zero, just set the font to bold.
It's a little unclear in your post, but I am going to assume you are working with entering data in a form.

The form is called frmPayments and the field that you are speaking of is called txtPremiumPay.

Put this on the field.

-------------------------------------------------------
Private Sub txtPremiumPay_AfterUpdate()
If Me.txtPremiumPay.Value > 0 Then
Me.txtPremiumPay.FontBold = True
Else
Me.txtPremiumPay.FontBold = False
End If
End Sub
--------------------------------------------------


If you want the bold/nonbold to be set when the form is opened (for example if the forms will be used to review, and not just to enter data) you may also want to put this somewhere else, maybe the forms activate event.

-Chris
 
Another way would be to have the field that you have the curreny in with a transparent background. Underneath this have a field, unbound, with the following properties set as shown. This requires no coding
DATATAB
Control Source: =[PremiumPayment]>$0.00
FORMATTAB
Format: ;ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
Back Color: 12632256
Special Effect: Flat
Fore Colour: 255
Font Name: Terminal
Font Size: 12


This will have the effect of showing all entries with a value greater than $0.00 with a red background. Other Colours can be chosen by changing the Fore Color property.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top