vb6 - 如何解决 MS Access 2007 报表中出现的名称冲突错误 (VB6)

标签 vb6

我有一个 MSAccess2003 数据库,其中几乎没有报告(报告采用 VB 6.0 代码),我使用 2007 年的选项从 2003 迁移到 2007,现在我在 2003 版本中引用的文件很少不存在在 2007 版本(存储库)中,如果我添加对 2003 年引用的组件的引用,则会出现“名称与现有模块、项目或对象库冲突”之类的错误。谁能帮我解决这个问题

最佳答案

请检查下面的链接,这将解决此错误

http://kalidadiz.wordpress.com/2010/07/16/access-2007-recordset2/

编辑:链接中的信息...

But when I tried to compile it, the declaration I just made is highlighted when this compile error message appeared:

未定义用户定义类型

As it turned out, the Recordset2 object needed the support of an object library named Microsoft Office 12.0 Access Database Engine Object Library. Thinking that I quickly found the solution, I went right ahead and added this library via the Tools-References within the VBA Editor… and this error showed up:

名称与现有模块、项目或对象库冲突

I guess it wasn’t that quick to solve after all! Next step I had to do was figure out how to get rid of this second error, and internet to the rescue once more! As it turned out, the conflict had something to do with an existing library that’s already in the references section. The conflicting libraries are: Microsoft DAO 3.6 Object Library Microsoft Office 12.0 Access Database Engine Object Library The first is an already existing library in the references, and does not seem to allow the second one to be added, and thus, well, the conflict. I found an explanation for this online: the Microsoft DAO 3.6 Object Library is useful only if you work with the .mdb format, and although this still works with the new .accdb format, a much better choice is the Microsoft Office 12.0 Access Database Engine Object Library, which handles everything that the Microsoft DAO 3.6 Object Library does, as well as provide support for the new 2007 version. Armed with this explanation, I removed the Microsoft DAO 3.6 Object Library from the References, and then added the Microsoft Office 12.0 Access Database Engine Object Library… Problem solved!

关于vb6 - 如何解决 MS Access 2007 报表中出现的名称冲突错误 (VB6),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10083557/

相关文章:

序列填充数字的算法

vb6 - 编辑框更新时如何收到通知

c# - 添加对 VS2008 项目的 VB6 ActiveX DLL 引用

vb6 - 是否可以编写 App.PrevInstance Replacement 来提供实时信息

performance - vb6 中更快的字符串比较

WPF、VB 和 Application 对象

vb6 - TrackPopupMenuEx 和 TrackPopupMenu 窗口 API 之间有什么区别?

vb6 - VB6 中的窗体居中

datetime - 一个更好的 VB6 CDate

vb6 - “DoEvents”在vb6中做什么?