converting numbers to currency

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a database that has a couple of hundred fields, most are text but I do
have some that I want to set for currency.

Problem: the currency input mask that access has is not what I need. I
would like to just input numbers, then when I press tab, have those numbers
convert to currency.

Example: if I type 123456, after tab I would like it to look like this
$1,234.56
or 3456, after tab I would like it to look like this $34.56

a solution to this problem would help me alot.

Thanks in advance
Paul M
 
Paul,

Having the $ sign and all that is simple, it is just the Format property
of the control set to Currency.

On the After Update event of the control, put code like this...

If IsNull(Me.NameOfControl.OldValue) Then
Me.NameOfControl = Me.NameOfControl / 100
End If
 
Use the following code in the after update event of a control.

If Int(Me.SomeControl) = Me.SomeControl then
Me.SomeControl = Me.SomeControl/100
End If
 
I can't do better than the answer Wayne gave to your similar recent
question here under the subject "Currency Input Mask".
 
Back
Top