Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2016-11-03
2
Medium Priority
?
34 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 19

Expert Comment

by:Eric Sherman
ID: 41872395
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 2000 total points
ID: 41872400
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

609 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