Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 449
  • Last Modified:

access PK field

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
Rayne
Asked:
Rayne
2 Solutions
 
GrahamSkanCommented:
Choose Text for field type.
0
 
hnasrCommented:
Have, as GrahamSkan commented, a text field type. and use:
fld = Right("00000" & fld, 5)

Open in new window

0
 
RayneAuthor Commented:
Awesome you both :)
Thank you
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now