Formatting currency with the cents but without the decimal point

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
 
F

fredg

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top