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
Steve Schapel - 09 Jan 2006 18:57 GMT
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

Signature
Steve Schapel, Microsoft Access MVP
> 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.
[quoted text clipped - 11 lines]
> Thanks in advance
> Paul M
John Spencer - 09 Jan 2006 19:51 GMT
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 have a database that has a couple of hundred fields, most are text but I
>do
[quoted text clipped - 13 lines]
> Thanks in advance
> Paul M
John Nurick - 09 Jan 2006 20:06 GMT
I can't do better than the answer Wayne gave to your similar recent
question here under the subject "Currency Input Mask".
>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.
[quoted text clipped - 11 lines]
>Thanks in advance
>Paul M
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.