ms-access - ms Access编译错误: user-defined type not defined

标签 ms-access compiler-errors

我试图将此添加到我的代码:

Dim myRS1 As DAO.Recordset

却给了我这个错误:
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库,但是它说Error in loading DLL
    我不明白,我以前的项目使用完全相同的代码,但它们完全可以正常工作。

    最佳答案

    我想我们在这里讨论Access 2003。
    在Visual Basic窗口的菜单“工具>引用”中,勾选并选择了“Microsoft DAO 3.6对象库”,它应在窗体底部显示DLL的位置。它将类似于:

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

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

    还要检查“对象浏览器”,在Visual Basic窗口中,菜单“ View >对象浏览器”。您应该能够在“顶部组合”中选择“DAO”库,然后浏览其“类和成员”。

    关于ms-access - ms Access编译错误: user-defined type not defined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49169591/

    相关文章:

    c++ - 剥离 OLE header 信息 (MS Access/SQL Server)

    c++ - Boost 编译问题

    eclipse - Scala 导入编译器错误

    c# - 声明 protected 成员的静态类

    excel - MS Access Nz() 函数无法在 MS Excel 中识别

    sql - 如何选择同一行的多个副本?

    sql - 如何避免 MS Access 中的 "Cannot delete from specified tables."

    c# - 在连接字符串密码中使用非 ASCII 字符

    java - SQLite where 子句

    c++ - 在命名空间中转发声明类抛出编译器错误