A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Importing Numbers



 
 
Thread Tools Display Modes
  #1  
Old April 23rd, 2008, 08:36 PM posted to microsoft.public.access.gettingstarted
[email protected]
external usenet poster
 
Posts: 45
Default Importing Numbers

I am importing an excell spreadsheet into access. One of the fields
that I'm importing has leading zero (ie 001-99-0099) which is saved as
an a special field so the leading 0's stay. When I import it into
access it changes it into a number field and removes the leading
zeros. How can I import the field and keep the zeros?
  #2  
Old April 23rd, 2008, 09:42 PM posted to microsoft.public.access.gettingstarted
Klatuu
external usenet poster
 
Posts: 7,074
Default Importing Numbers

Rather than allowing the TransferSpreadsheet to create the table, create your
own table to import into and define that field as a text field.
--
Dave Hargis, Microsoft Access MVP


" wrote:

I am importing an excell spreadsheet into access. One of the fields
that I'm importing has leading zero (ie 001-99-0099) which is saved as
an a special field so the leading 0's stay. When I import it into
access it changes it into a number field and removes the leading
zeros. How can I import the field and keep the zeros?

  #3  
Old April 23rd, 2008, 09:42 PM posted to microsoft.public.access.gettingstarted
Ron2006
external usenet poster
 
Posts: 936
Default Importing Numbers

What I have done is to open the spreadsheet from Access using
automation and then go to the appropriate tab, cell A2 and then insert
a row, I then place a 0 or X or a date into each cell across the
spreadsheet depending on what the data is supposed to be.
Then I close the spreadsheet,
Perform the transferspreadsheet
and then run a query that deletes the bogus record from the imported
table.



In this case you want to put an X in the column with the SSN
definition. This is because you want to have Access treat the field as
alphabetic not numeric.

Ron

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:14 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.