Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    codelines is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Oct 2017
    Posts
    8

    Error 3275 in Access 2000 when exporting to Excel using a query in a VB program

    I have a program using an Access 2000 database and I export data to Excel using a query in this format:
    SELECT filed1, field2, field3 INTO [EXCEL 8.0;DATABASE=C:\MyFolder;].[MyWorkSheetName] From [MS Access;Database=C:\MyFolder\MyDatabase.mdb].TableName

    From yesterday, I have received the error "3275 - Unexpected error from external database driver" evey time I try to expot data. Does somebody know if a recent Access update have caused this error?



    Thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    try
    docmd.TransferSpreadsheet acExport ,acSpreadsheetTypeExcel12,vQry,vFile,true,vSheetNa me

  3. #3
    codelines is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Oct 2017
    Posts
    8
    Thanks, ranman256, but I'm not using VBA, my program is in Visual Basic. But if I can not find a solution, I will try using the Access Application object to export with DoCmd. In this case, my users will need to install other Access components.

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    You can also use a macro instead of VBA.

  5. #5
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    I have a program using an Access 2000
    You wrote the program using VB6 or VB.Net and it is mining Access for data? To me, export Access data to Excel means the code execution is on the Access side. Import to Excel means the code execution is on the Excel side. Using code in either of these applications highly suggests the code is VBA not VB. While I would believe you if you said you referenced the VB library so you could write VB code in a VBA environment, to do so just wouldn't make a whole lot of sense.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    codelines is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Oct 2017
    Posts
    8
    I wrote my program using VB6 and the object Database has a method Execute that execute an sql query in a text like the one I posted above and that sql query exports data to Excel 8.0 format.

    Now I discovered that the problem was caused by the last Office updates of 10/10/2017. A customer of mine have used a restore point before 10/10/2017 and all worked fine.

  7. #7
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    I had a feeling that the Excel version being used in the select statement might be an issue but there are so many possibilities for this issue that I didn't want to start something.- especially since I thought this was operating in your usual environment and would have mentioned system upgrades as you would know about them. Also ignored the "filed1" which I presume is a typo.

  8. #8
    codelines is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Oct 2017
    Posts
    8
    Micron, the code has worked in more then 2000 customers for years. Now, after the Office updates the error has occured.

  9. #9
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    Because their Excel version isn't 8.0 any more right? They probably end up with 14 or higher after the upgrade. That would cause it.

  10. #10
    codelines is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Oct 2017
    Posts
    8
    No, Excel 8.0 is from 20 years ago or more and some of my customers use Excel of the most recent Office edition and my query was running ok there till 10/10/2017.

  11. #11
    MzTinaFL is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Oct 2017
    Posts
    1
    Codelines - I'm experiencing the same problem with importing .xls files into an Access 2000 program. Our latest update seems to be the culprit. When you mention restore back to previous point; do you mean you uninstalled the update for excel or did you uninstall all office updates? (note: I have Office 2016, Access 2003).

  12. #12
    codelines is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Oct 2017
    Posts
    8
    A customer of mine has restored only the state before 10/10/2017 and all goes right. So, the problem was the latest updates. If they affect imports too I don't know as my problem is with exportation. I have worked around the problem using the Excel object model to create a generic procedure to export data.

  13. #13
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  14. #14
    codelines is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Oct 2017
    Posts
    8
    What this has to do with our problem? It's only the announce of the updates that are the cause of it.

  15. #15
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

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

Similar Threads

  1. Error in VBA Code of Exporting Query Data to Excel
    By kirky in forum Import/Export Data
    Replies: 3
    Last Post: 02-09-2017, 08:47 PM
  2. Excel to Access/Program
    By anthony.maddick in forum Import/Export Data
    Replies: 1
    Last Post: 04-22-2015, 07:08 AM
  3. Replies: 2
    Last Post: 10-09-2014, 01:32 PM
  4. Replies: 6
    Last Post: 06-27-2013, 12:38 PM
  5. Importing a query into Excel 2000
    By jo15765 in forum Queries
    Replies: 1
    Last Post: 09-21-2011, 11:14 AM

Tags for this Thread

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