Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

RECORD LEADING zero's in a numeric field

Posted on 2006-11-02
5
Medium Priority
?
704 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
[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
5 Comments
 
LVL 120

Accepted Solution

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

Assisted Solution

by:dancebert
dancebert earned 664 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 664 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

688 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