Number Formatting


A

Ayo

I am trying to import a table from excel into access. One of the fields have
numbers formatted as 0001 in excel but when I bring it into access, I lose
the leading zeros, i.e 0023 becomes 23. How do I format the field to retain
the zeros?

Thanks
 
Ad

Advertisements

S

Steve Schapel

Ayo,

In a table, it is not normally necessary to concerned about what the
data's appearance is like, as tables are not normally seen in database
operations. If you want the number to be displayed on your forms or
reports with the leading zeros, set the Format property of the textbox to:
0000
 
T

Tom van Stiphout

On Mon, 31 Dec 2007 18:44:11 -0800, Ayo

?Format$("0000", 23)
-> 0023

-Tom.
 
Ad

Advertisements

D

DeltaTech

Hi Ayo

When inporting tables from Excel to Access
Be aware of what you want in Access
If you have leading "zeros" in Excel
Set the field property to "Text" in the inport wizard.
This will save you a lot of hassel.

have fun

DeltaTech
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top