leading zeros

  • Thread starter Thread starter Martin
  • Start date Start date
M

Martin

How do I add leading zeroes to a field? For example I have
a field named "Course_ID" when a user enters 10 I would
like to show it as 00010.

Your help is appreciated,
Martin
 
If this is a text type field you could use the after update event like:
Me.txtCourse_ID = Right("00000" & Me.txtCourse_ID,5)
If this is a numeric field, you could try set the format property to:
Format: 00000
 
Back
Top