Question Export table with field into format...

zgnd

New member
Local time
Tomorrow, 03:51
Joined
Oct 12, 2009
Messages
3
Dear Expert,

Hope someone can solve my problem. This problem been buggin me for few days and i still get it solved.

I need to export a table into a text file (.txt) with field name "amount" as text with width 15.
But i also need the preseding character to be filled with "0"

Eg: 1510 to become 000000000001510

Please help. Thank you very much
 
If you use format(Amount,"000000000000000") it will work.

David
 
If you use format(Amount,"000000000000000") it will work.

David

Thank you very much for your reply.
I am sorry that i "hijack" other post as i am not aware of that. my bad...sorry

I hope i am not driving you crazy... as i am not so sure and don't understand how or where should i use :-
format(Amount,"000000000000000")

Please and kindly explain to me. Thank you so much.
 
Create a new query that is based on the table you want to export. Bring down each field you want to export, then in the column that contains the amount field use the following:

Amt:Format([Amount],"000000000000000")

Where Amount is the actual name of the field in the table. Save the query and use this as the source of the export data. If you view the results in datasheet view you should see the newly formatted amount field has the preceeding zeros. This will be exported as a string and not a number.

David
 

Users who are viewing this thread

Back
Top Bottom