CopyFromRecordset问题 [英] CopyFromRecordset Problem
问题描述
我在VBA Access中遇到CopyFromRecordset函数问题。我试图在Access数据库中运行VBA,将查询结果复制到Excel电子表格中。 VBA打开Excel模板,运行查询,然后尝试将查询作为记录集复制到Excel电子表格中。问题是我在尝试使用CopyFromRecordset函数时出现以下错误:运行时错误'430'':类不支持预期的接口。以下是我正在使用的代码。最后一行是导致错误的行。我究竟做错了什么?感谢您的帮助。
I am having a problem with the CopyFromRecordset function in VBA Access. I am attempting to run VBA in an Access Database that copies query results into an Excel spreadsheet. The VBA opens an Excel template, runs the query, then attempts to copy the query as a recordset into the Excel spreadsheet. The problem is that I get the following error when trying to use the CopyFromRecordset function: "Run-time error ''430'': Class does not support expected interface. Below is the code I am using. The last line is the one that causes the error. What am I doing wrong? Thanks for any and all help.
推荐答案
那里。 />
尝试ADO记录集而不是DAO。
Hi, there.
Try ADO recordset instead of DAO.
那里。
尝试ADO记录集而不是DAO。
Hi, there.
Try ADO recordset instead of DAO.
究竟是怎么做的?
How exactly is that done?
这篇关于CopyFromRecordset问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!