Share via

DAO importing csv problem

Anonymous
2022-11-18T17:11:15+00:00

I have an Access database and using vba in this database I wish to open several csv files and copy data from one sheet in each file to a new Excel workbook using DAO.  I am using the connection string as below and I get a Run Time Error 3044 – which is saying it is not a valid path.  I have tried saving the file down as an .xlsx and changing the string as below and this works fine. 

 I will be grateful for any help on this as clearly there is something wrong with my connection string

Connection string for the csv import

(OpenDatabase(strSourceFile, False, True, “Text;”)  This errors out.

Connection string used successfully for the .xlsx

(OpenDatabase(strSourceFile, False, True, “Excel 12.0;”)   This works fine.

Regards

Spike

Microsoft 365 and Office | Access | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2022-11-19T08:43:13+00:00

    Dear Spike,

    Good day! 

    Thanks for posting in Microsoft Community. 

    We would love to help you on your query about VBA code, however, our team focuses on general query, for example, installation and activation issue of Office 365 products. The situation you mentioned is related to VBA code, you can to refer to this article: Office VBA support and feedback | Microsoft Docs to go to Stack Overflow by using the VBA tag, along with any other relevant tags as there are also many experienced engineers and experts in the forums there. 

    Disclaimer: Microsoft provides no assurances and/or warranties, implied or otherwise, and is not responsible for the information you receive from the third-party linked sites, or any support related to technology. 

    At the same time, we will also keep this thread open, so other Community members and Experts can also share their suggestions and inputs. 

    Thank you for your cooperation and understanding! 

    Best Regards, 

    Cliff | Microsoft Community Moderato

    Was this answer helpful?

    0 comments No comments