Solved

RECORD LEADING zero's in a numeric field

Posted on 2006-11-02
5
659 Views
Last Modified: 2012-08-13
I need to be able to record a number such as 0089 in numeric format in a field with in a table. each time I key in 0080 it records 80 dropping the leading zero's
the field must remain numeric please don't suggest to change to a text field
0
Comment
Question by:Jjuavinett
5 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 168 total points
ID: 17860886
set the field format to 0000 in table design view
0
 
LVL 9

Assisted Solution

by:dancebert
dancebert earned 166 total points
ID: 17861892
You can't store leading zeros in a numeric field.  You can, however, display a number with leading zeros.  0089 gets stored as 89.  You can display it as 0089, 89, 89.0, 89.00, etc.
0
 
LVL 35

Assisted Solution

by:Raynard7
Raynard7 earned 166 total points
ID: 17862243
Hi, dancebert is correct

using format you could do

expr1: format([your field], "0000")

which would display it with four characters,

Alternativley if you are not using this as a number at all and just as a unique id you could change your field to text and put a mask on it of #### in your field to ensure only digits are placed in it.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

920 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

14 Experts available now in Live!

Get 1:1 Help Now