Solved

How make number entered in a form field start with a "0"

Posted on 2016-11-03
2
14 Views
Last Modified: 2016-11-03
I have a form with a field and if the user enters a number <10, for example, then I want the number to appear with a zero in front of it.

For example:

If "3" is entered, make it appear as "03"

But if for example "12" is entered, leave it alone and let it be "12"
0
Comment
Question by:SteveL13
  • 2
2 Comments
 
LVL 19

Expert Comment

by:Eric Sherman
Comment Utility
Just set the Data Type to Text if that is an option for your field.

ET
0
 
LVL 19

Accepted Solution

by:
Eric Sherman earned 500 total points
Comment Utility
Then you can use the Before Update Event on your Form or Control to test the length of the data entered.  If 1 then add the 0 in front.

ET
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now