Results 1 to 9 of 9
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts
    When I import from a text file, Access is dropping the leading zero on a Business Unit Field. The field is set to "text" on the import specification.

    As an example:
    Text file contains: 01802
    After import Access shows: 1802

    Any ideas?

    Thanks,
    John

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts
    [quote name='jstevens' post='783665' date='08-Jul-2009 18:37']When I import from a text file, Access is dropping the leading zero on a Business Unit Field. The field is set to "text" on the import specification.

    As an example:
    Text file contains: 01802
    After import Access shows: 1802[/quote]
    What are you importing into? That is, is it creating the table or is it an existing table? What is the data type of the field it is importing into? I'm guessing it is numeric.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    When I try this in Access 2002 SP3, leading zeros are preserved.

    I don't want to doubt your statement, but are you sure that you've actually set the field to text? The import text wizard tends to show the settings for the first field only, you actually have to click Advanced to be able to specify settings for the other fields.

  4. #4
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='MarkLiquorman' post='783667' date='08-Jul-2009 15:43']What are you importing into? That is, is it creating the table or is it an existing table? What is the data type of the field it is importing into? I'm guessing it is numeric.[/quote]


    The import is going to an existing table whose field's data type is set to text.

    Regards,
    John

  5. #5
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='MarkLiquorman' post='783667' date='08-Jul-2009 15:43']What are you importing into? That is, is it creating the table or is it an existing table? What is the data type of the field it is importing into? I'm guessing it is numeric.[/quote]

    Hans,

    Here is a screen shot of the import settings.
    Attached Images Attached Images

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    I don't see where you specify Text as data type (in Access 2002 the data type is next to the field name).

  7. #7
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='783673' date='08-Jul-2009 15:58']I don't see where you specify Text as data type (in Access 2002 the data type is next to the field name).[/quote]

    Han's,

    I'm using Access 2007. Here is another screenshot.

    Regards,
    John
    Attached Images Attached Images

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    No idea then. Hopefully someone who has Access 2007 will jump in.

  9. #9
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    [quote name='jstevens' post='783674' date='08-Jul-2009 17:02']I'm using Access 2007. Here is another screenshot.[/quote]
    I believe this screenshot is of the table design - if not correct me. If you click the "Specs..." button in your previous screenshot, I believe you will find the data types defined. All that aside, I've had some significant issues with the import/export functions in 2007. One thing you might want to do is install SP2 if you haven't - it does fix a number of issues, and add some new capabilities.
    Wendell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •