Solved

access PK field

Posted on 2014-01-17
3
441 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
ID: 39790131
Choose Text for field type.
0
 
LVL 30

Assisted Solution

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

Open in new window

0
 

Author Comment

by:Rayne
ID: 39790167
Awesome you both :)
Thank you
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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…
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…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

820 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