formating currency

  • Thread starter Thread starter J.J.
  • Start date Start date
J

J.J.

Hi,
i have in my table/form two fields, first is number_field(decimal) and
second is combo with two values from other table(USD and EURO). now i want
that after i select USD the number_field is formated as Currency and if i
select EURO than as Euro.
how can i make this happen?
many thanks
J.J.
 
J.J.,

You can try putting the below code in the *AfterUpdate*
event of your combo box control.

Also, define the data type of the bound field underlying
the txtNumber control as "Double."

I just tested this and it works for me.

With Me
Select Case !cmbCurrencyType
Case "USD"
!txtNumber.Format = "Currency"

Case "Euro"
!txtNumber.Format = "Euro"

Case Else
'Do something else.
End Select
End With

Also, in case you are not already using it, a EuroConvert
function is available. The online help explains how to
use it.
 
Back
Top