Access 2003 Tip - Format a Number with Leading Zeros

Sometimes, it is important for a number to show up with leading zeros. This is often the case with identifiers such as part numbers of member ids. Here's a trick I recently used while developing an Access Database for a client.


  1. Open the table in Design view.
  2. Make sure the Datatype of the field is set to Number.
  3. Select the General tab.
  4. Click on the Format line, and set the format to 00000.

This forces all numbers in that field to show up in 5 digits with leading zeros.
For example:
7 is now 00007,
567 is now 00567,
1200 is now 01200.

No comments: