Page 2 of 2 FirstFirst 12
Results 16 to 26 of 26
  1. #16
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Maybe it is time to post the dB for analysis? Do a Compact & Repair, then compress it (Zip).

  2. #17
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,424
    did you try the suggestions in post #12?

  3. #18
    dmgg is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Feb 2014
    Posts
    42
    I tried something new. I modified the old excel file (added the two new fields to excel and to the query that exports the data) and works! Why?

    The excel file still needs mods because the person who set it up changed calculations and exports on other sheets. I will try modifying the excel file so that the calculation sheets use the new data. I just can't understand why I couldn't upload the new data to his modified excel file. Layout is the same except for the two added fields.

  4. #19
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,927
    Quote Originally Posted by dmgg View Post
    I tried something new. I modified the old excel file (added the two new fields to excel and to the query that exports the data) and works! Why?

    The excel file still needs mods because the person who set it up changed calculations and exports on other sheets. I will try modifying the excel file so that the calculation sheets use the new data. I just can't understand why I couldn't upload the new data to his modified excel file. Layout is the same except for the two added fields.
    Hmm, try exporting to a new excel file, not yet created.
    It would appear from what you are saying now, that the fields must match?.
    Not heard of that before TBH, but there is a lot I have not heard about.

    Edit: I have just tried the same scenario and it works fine for me?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #20
    dmgg is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Feb 2014
    Posts
    42
    Embarassing. I finally got it to work. Somehow the export is tied to the name of the old excel file. I can't find where or how, no statement in Access code,. But when I gave the old Excel name to the new Excel file, Access had no trouble exporting.

    Thank you all for help. I learned a lot about modern Access while struggling through this.

  6. #21
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,927
    How can you say that?
    It is exporting to whatever is in ExcelFile ?
    Though there does appear to be a period before it?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  7. #22
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You never did post the dB, so it is hard to know what the problem is with the name. Could be an import/export specification. Could be in code somewhere.

    But you have found a work-a-round.


    Good luck with your project....

  8. #23
    dmgg is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Feb 2014
    Posts
    42
    I finally got it working. Embarassed to say that the cause was "simple". The name of the excel file had been changed. The excel name I was using-(not sure yet how it is included in the code)-was an old one. Thank all of you much much-I learned a lot.

  9. #24
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,927
    Only simple when you get to the bottom of it.
    This is one which I call 'silly' errors.

    If you had stepped back and inspected each part in turn, then it would have been obvious and found.
    I asked you what was in ExcelFile back in post #4.

    Learn to debug your/or anyone else's code

    TBH though, suprised it just did not create a new file by that name?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  10. #25
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,424
    TBH though, suprised it just did not create a new file by that name?
    probably did but the OP was looking at the old file

  11. #26
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,927
    Quote Originally Posted by Ajax View Post
    probably did but the OP was looking at the old file
    My thoughts as well, but this whole thread started for ?

    The message:
    RUN TIME ERROR '3420'
    OBJECT INVALID OR NO LONGER SET
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Automatic transfer data from Access to Excel
    By Sarabjit in forum Access
    Replies: 11
    Last Post: 10-20-2014, 07:27 PM
  2. Replies: 2
    Last Post: 10-16-2014, 12:08 PM
  3. Replies: 5
    Last Post: 06-12-2011, 03:58 PM
  4. How to transfer data from excel to Access?
    By mit in forum Import/Export Data
    Replies: 4
    Last Post: 06-11-2011, 05:39 PM
  5. Transfer data to excel
    By John Southern in forum Import/Export Data
    Replies: 5
    Last Post: 06-11-2010, 09:26 AM

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