ms Access编译错误:未定义用户定义的类型 [英] ms access compile error: user-defined type not defined

查看:139
本文介绍了ms Access编译错误:未定义用户定义的类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将其添加到我的代码中:

i am trying to add this to my code :

Dim myRS1 As DAO.Recordset

但是它给了我这个错误:

yet it gives me this error:

Compile error: user-defined type not defined

我已经通过以下链接:

  • compile error: user-defined type not defined
  • Compiler Error: User-defined types not defined
  • What is "Compile error User-defined type not defined"?
  • w7 -> VB6 error "User-defined type not defined"
  • http://www.tek-tips.com/viewthread.cfm?qid=1731794

但仍无济于事。

我尝试添加 Microsoft Access 3.6 库,但是它说加载DLL时出错

I have tried adding the Microsoft Access 3.6 library yet then it says Error in loading DLL

我不明白,我以前的项目使用的是完全相同的代码,但它们完全可以正常工作。

I don't understand, my previous projects use the exact same code yet they work completely fine.

推荐答案

我想我们在这里讨论的是Access 2003。
在Visual Basic窗口中,选中工具>引用菜单中的&选择 Microsoft DAO 3.6对象库,它应该在窗体底部显示DLL的位置。就像这样:

I guess we are taking about Access 2003 here. In the Visual Basic windows, menu 'Tools > References' having ticked & selected 'Microsoft DAO 3.6 Object Library', it should show the location of the DLL at the bottom of the form. It will be something like:

C:\Program Files\Common Files\Microsoft Shared\DAO\DAO360.DLL

检查DLL及其相关文件是否存在。将文件夹内容与另一台工作的PC进行比较,并根据需要跨文件复制。 (始终备份原始状态。)错误加载DLL时出错可能表明DLL损坏。

Check that DLL, and associated files exist. Compare the folders contents with another working PC, and copy across files as necessary. (Always take backup of original state.) The error 'Error in loading DLL' may indicate a corrupted DLL.

还请在Visual Basic中检查对象浏览器 Windows中,菜单视图>对象浏览器。您应该可以在顶部组合中选择 DAO库,然后浏览其班级和成员。

Also check the 'Object Browser', in the Visual Basic windows, menu 'View > Object Browser'. You should able to select the 'DAO' library in the Top Combo, and then browse it's Classes & Members.

这篇关于ms Access编译错误:未定义用户定义的类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆