Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
mar
New Member
Posts: 46
Registered: ‎01-11-2010

3 Digit Decimal on Currency Field

I added a text field to the [Add Edit Product] Form and set the FormatString to %.3f but the three decimal doesn't stick when the cursor lands on the field. ... it basically changes to currency format with two decimals and a dollar sign. The field/Form is not bound to the table and the field is of type Currency (numberic(17,4),null). Any workaround for this?

Thanks.

Silver Super Contributor
Posts: 801
Registered: ‎03-24-2009

Re: 3 Digit Decimal on Currency Field

You need to change the formatting via code (shown below)


Form: Add Edit Product (if you want to change the Tools | Manage Products | Add Pricing)
----------------------------------------------------------------------------------------

Sub DefinePriceGrid ( )

'Price column
Set col = .Columns.Add(13)
col.FieldName = "PRICE" 'DNL
col.Width = 70
If GetMCValue(MC_On) = "T" Then
col.DisplayFormat = ",0.0000;-,0.0000" 'DNL
col.Caption = Application.Translator.Localize("Price") & " (" & GetMCValue(MC_BaseCurrencyCode) & ")"
Else
' col.DisplayFormat = "$,0.00;$-,0.00" 'DNL
col.Caption = Application.Translator.Localize("Price")
col.DecimalPlaces = 4 '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
col.DisplayFormat = ",0.0000;-,0.0000" 'DNL '<<<<<<<<<<<<<<<<<<<<<<