Format text to 5 chars from a number

3

In Access, I used a query to sum some numbers and appended the answer to another table (table 2). Now I need to export the number as string with five positions, but I can't seem to get it to hard code all five positions.

I have it formatted as text, field length 5, custom format "00000" (I also tried @@@@@). Example: 3 + 3 + 1 = 7. Then append the 7 to table 2. It always shows as 7. How do I make it show as 00007?

Wheelersg

Posted 2011-06-21T00:10:18.233

Reputation: 31

Answers

3

In Access, do it as in this query:

SELECT aTable.aNumber, Format([aNumber],"00000") AS yourNumber FROM aTable;

datatoo

Posted 2011-06-21T00:10:18.233

Reputation: 3 162