Results 1 to 2 of 2
  1. #1
    thart21 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    83

    Import Excel and date formats

    Hi there,

    I'm having a strange issue when importing an Excel 2007 worksheet to Access 2007. I have 4 date fields that are formatted in Excel as Date/Time type *3/14/2001. I have my import process set up by a command button that deletes and appends the new data to the Access table. I have the same Date/Time formatting in the table for all 4 fields.
    When I import, 2 of the fields don't come across and the import errors table states Type Conversion Failure.

    I don't understand why, if all of the data types are the same, just 2 of the fields would have problems.

    Update: I do understand that Access looks at the first several rows to determine the datatype and, in looking closer, these two fields are blank for about the first 20 rows, I put in 0/00/0000 in the first row for both and the data came across. But, since the Excel file data will change (via copy/paste from another source) I don't want my users to have to do this each time. Any other option?

    Thanks,

    Any ideas??
    Thanks!
    Last edited by thart21; 04-19-2011 at 03:01 PM. Reason: Update - possible solution

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    so you're appending this data to a table already in access?? why can't you delete the old table and import the excel each time?? If I'm right, I don't believe that blank rows will cause any system errors for data type mismatches if you do it that way. the table should come over one way or another. and after it does, if there are any changes to be made, make them via vba or macros. It shouldn't be tough.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Import from Excel
    By Jonathan58 in forum Import/Export Data
    Replies: 18
    Last Post: 07-19-2013, 09:52 AM
  2. Excel Import
    By jesleon in forum Import/Export Data
    Replies: 4
    Last Post: 08-24-2010, 07:32 AM
  3. Replies: 2
    Last Post: 08-17-2010, 01:10 PM
  4. Import Excel with SQL - again
    By tpcervelo in forum Queries
    Replies: 1
    Last Post: 08-06-2010, 08:13 PM
  5. VBA to open excel, import on close of excel
    By bdaniel in forum Programming
    Replies: 0
    Last Post: 03-20-2010, 02:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums