IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
Access
Search Access Group:

Advanced
-Collapse +Expand Access To/From
To/FromCODEGuides
-Collapse +Expand Access Store
PRESTWOODSTORE

Prestwood eMagazine

December Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyMicrosoft Access BoardAccess VBA Programming Topic   Print This     

leading zeros in a field

leading zeros in a field in Access VBA Programming topic (part of our Microsoft Access group).

Quick Search: leading   leading zeros   leading zeros field  
ErnNJ33
NJ
Does any one know a way to put leading zeros in a field automatically? My employer wants a customer number field that is 8 numbers long and shows the zeros for empty spaces ( 00000001 ). I'm pretty sure I could figure a way to do it with VBA but I would rather put in the table design for simplicity. Thanks in advance.
 Posted 19 years ago (Thread Starter)
Comment Quote
About ErnNJ33 -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #6109, 3 replies
Thread Started 5/6/2002 6:01:00 AM
View Counter=2141
Last Reply Posted 5/9/2002 8:07:00 AM)
Location=NJ  
Joined=19 years ago   MB Posts=5  
jdschram
MN
I'm not sure if it can be done in the table design, I tried messing around with the Input Type and couldnt get anything to work. Personally I would do it in VBA, but if you can probably do create it by running an update query in the background...
 Posted 19 years ago
Comment Quote
About jdschram -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #6111 (Level 1.1)  Reply to 6109
Thread Started 5/6/2002 9:56:00 AM
View Counter=2
Location=MN  
Joined=20 years ago   MB Posts=259  
Kal Palmer
Atlanta, GA
If I understand your question correctly you want to be able to enter a number like "234" and it will be shown as "00000234"? If I'm right and this is what you want all you have to do is go into your table design and create a field like this.

Create field: SomeField1
Field Size: Long Integer
Format: 00000000
Decimal Place: Auto
Etc.........

By creating a number field and formatting it with eight zeros you are telling access that you want this field to alway have eight numbers.
 Posted 19 years ago
Comment Quote
About Kal Palmer -Collapse +Expand
Visit Profile
Membership pending.
Member subscribes to this thread but email is NOT VERIFIED.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #6122 (Level 1.2)  Reply to 6109
Reply Posted 5/7/2002 5:32:00 AM
Location=Atlanta, GA  
Joined=19 years ago   MB Posts=23  
Most Recent Post
ErnNJ33
NJ
Thanks Kal Palmer,
Thats what I was doing wrong. I had it as a text data type. thanx.
 Posted 19 years ago (Thread Starter)
Comment Quote
About ErnNJ33 -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #6167 (Level 1.3)  Reply to 6109
Reply Posted 5/9/2002 8:07:00 AM
Location=NJ  
Joined=19 years ago   MB Posts=5  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P195A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #6109 Counter
2141
Since 4/2/2008
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2021 Prestwood IT Solutions.   [Security & Privacy]