Solved

access PK field

Posted on 2014-01-17
3
435 Views
Last Modified: 2014-01-17
I have a excel file that formats a number like 111, 5555 like this > 00111, 05555 – so that its 5 digits always. Now the excel file has the metric column like that. How do I make or set the first field in a table in access so that it takes numbers with leading zeros (total digits – 5) and stores it just like that?
0
Comment
Question by:Rayne
3 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 260 total points
Comment Utility
Choose Text for field type.
0
 
LVL 30

Assisted Solution

by:hnasr
hnasr earned 240 total points
Comment Utility
Have, as GrahamSkan commented, a text field type. and use:
fld = Right("00000" & fld, 5)

Open in new window

0
 

Author Comment

by:Rayne
Comment Utility
Awesome you both :)
Thank you
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

743 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

13 Experts available now in Live!

Get 1:1 Help Now