+ Reply to Thread
Results 1 to 9 of 9

excell to access import problem

  1. #1
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2003
    Posts
    38

    excell to access import problem

    Hi guys I have an issue which I have been trying to fathom out and would welcome any help or suggestions.
    Firstly on a daily basis I copy some production information and paste into two macro enabled excel files . Lets call them FILE 1 AND FILE 2 .The macro auto fills in the date.#
    These excel files are imported into my access data base by way of a button in the access database which append the files to 3 different tables. Table 1 from file 1.Table 2 from file 2and a third Table which is called Table 3 which imports File 1 and 2 .
    I also have the same thing appending a different database which is a backup.
    The problem I have encountered is that some times I find that not all the information has been imported into table 2 and the same info is missing from table 3.
    I have worked out that in one field it is not importing any items that have letters and dashes. the field is formatted as short text.
    It doesn't happen to File 1 and it doesn't happen every day so I having trouble working out what is wrong ..... anyone have any ideas?

    Thanks for reading this

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,860

    Re: excell to access import problem

    It may be that the excel file is formatted differently than the Access table. This will cause the rejection and error.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: excell to access import problem

    Hi thanks for the reply, I have checked the formatting and it is ok .....I have also copied the excel file that imports to file one and used this to import to table two .......it works for a WHILE THEN IT STOPS IMPORTING ITEMS WITH A - OR LETTERS FOR EXAMPLE IF THE PRODUCT IS 3333-33 IT WONT LOAD THE ENTRY IF IT IS 333YAY IT WONT EITHER EVEN THOUGH BOTH TABLE AND EXCELL FILES ARE FORMATTED TO TEXT.
    I DONT HAVE THIS PROBLEM WITH TABLE ONE

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,860

    Re: excell to access import problem

    At this point, without seeing your files that you are importing (sample size) and the database, it is nearly impossible to diagnose the issue. you can upload the files using the Advanced Button on the reply window. You will have to zip the Access file. Suggest you only have a moderate sized sample that is representative of the issue. Make sure to run a compact and repair before zipping the file. Change all references to confidential information.

  5. #5
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: excell to access import problem

    Hi I have tried to up load a basic database with and idea of what I am doing . The two macro enabled spread sheets are in the basic form I receive the information .If the date macro is ran it populates the date and auto fills in blanks in the next field .As you can see from table two it has not recognised some of the data .If the formatting is checked on the linked table that field always returns to numbers.... Hope this helps
    Attached Files Attached Files

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,860

    Re: excell to access import problem

    There is no form or button in the data base provided nor any code. There is no data in the excel spreadsheets to compare to the data in the existing tables and their properties. Your macro to add data puts it in the first row and corrupts the field names in your spreadsheet. There is not much I can tell you about what is wrong at this juncture due to these issues.

  7. #7
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: excell to access import problem

    Hi sorry I was just trying to simplify .I will load an almost complete version .The label on the main form called scrap breakdown generates the inputting to the tables when pressed. I know the formatting changes in the excel sheets but I don't get any issues in table one just table two ....I am just learning myself in access and have built this database with help from this forum and although I have probably made many mistakes Im always glad to receive advise or direction.
    Thanks for your help so far

  8. #8
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: excell to access import problem

    Here is a better version
    Attached Files Attached Files

  9. #9
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,860

    Re: excell to access import problem

    Unable to run the macro you indicated. It errors out and indicates that the db is read only and then I get a message to cancel all macros. Now, when I open the form in design view and click on the button indicated to read the code, it shows an embedded macro. I do not use macros in my databases. Only VBA. Macros in Access are very different from Excel. I apologize, but given the area you are in---I have no expertise as I have never worked with Access Macros. I hope that someone else will be able to provide you with a better solution.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Use an Excel Macro in Access VBA - Import text file in Access Table
    By joogibabu in forum Access Tables & Databases
    Replies: 3
    Last Post: 10-08-2014, 10:04 AM
  2. [SOLVED] How to link an excell data to ACCESS (using ACCESS as a storage?)
    By jjin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-15-2013, 09:24 PM
  3. Import all access files from a folder to a single excell file
    By wali in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-08-2009, 05:04 AM
  4. Data import Problem: Access Query to Excel
    By Minder in forum Access Tables & Databases
    Replies: 1
    Last Post: 05-25-2009, 04:23 PM
  5. Vlookup problem with Access Query import into Excel 2000
    By Neophyte in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 07-16-2006, 10:35 PM
  6. macro to import access data into excell
    By GerryE in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-11-2006, 05:55 PM
  7. Problem with data import from Access
    By Frankie in forum Excel General
    Replies: 0
    Last Post: 05-20-2006, 06:35 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1