Formatting currency with the cents but without the decimal point

  • Thread starter Thread starter tgavin
  • Start date Start date
T

tgavin

I have a client who needs to export check information in a text format. The
bank is requiring that all fields take x number of characters, which I have
been able to do except that the check amount needs to read 10 digits without
the decimal place. ie: $247.84 becomes 0000024784. I can get it to
00000247.84 with the function Format([CkAmount],00000000.00) but the minute I
take out the decimal, I get a decimal, I get 0000000247.

I should also mention that this is an Access 97 db that has to be totally
redone at some point in a later version. It won't convert to any higher a
version because there is a lot of code in it that goes back to either Access2
or Access 95.

Thanks
Terri
 
I have a client who needs to export check information in a text format. The
bank is requiring that all fields take x number of characters, which I have
been able to do except that the check amount needs to read 10 digits without
the decimal place. ie: $247.84 becomes 0000024784. I can get it to
00000247.84 with the function Format([CkAmount],00000000.00) but the minute I
take out the decimal, I get a decimal, I get 0000000247.

I should also mention that this is an Access 97 db that has to be totally
redone at some point in a later version. It won't convert to any higher a
version because there is a lot of code in it that goes back to either Access2
or Access 95.

Thanks
Terri

Multiply the [CkAmount] by 100.
Also, the format must be a string, as below.

From the Access Debug window:

?Format(284.84 * 100,"0000000000")
0000028484
 
Back
Top