leading zeros

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
 
D

Duane Hookom

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top