Access Tip – Format a Number with Leading Zeros

Untitled Document

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>