?
Solved

access PK field

Posted on 2014-01-17
3
Medium Priority
?
451 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 77

Accepted Solution

by:
GrahamSkan earned 1040 total points
ID: 39790131
Choose Text for field type.
0
 
LVL 31

Assisted Solution

by:hnasr
hnasr earned 960 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

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

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

This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
I tried to use the SharePoint app to Import a Spreadsheet and import an Excel sheet into a Team site made in SharePoint 2016. But that just resulted in getting an error message 'Unknown Error'...
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

588 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