Filling Field Length

pgc72

New member
Local time
Today, 23:50
Joined
Dec 13, 2006
Messages
4
I am hoping someone can help me with a module I am trying to write.

What I am trying to do is to export a txt file from a query in Access via a module. There is one particular field that needs to be exported with 9 characters, however there will be some that may only have six characters, so I will need to fill in the other three characters with zero's. For example if the field contains 123456 I need to export 9 characters which would be 000123456. There will be some that may only contain 4 characters 1234 will need to be exported as 000001234.

Any help would be appreciated.

Regards
 
pgc,

Since it's a number, change the column in the query to:

NewField: Format([YourOriginalField], "000000000")

Wayne
 

Users who are viewing this thread

Back
Top Bottom