dao.recordset2和dao.field2不可用.我收到编译错误 [英] dao.recordset2 and dao.field2 not usable. I got compilation error

查看:71
本文介绍了dao.recordset2和dao.field2不可用.我收到编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始在Access上使用VBA,我只想使用这种类型:recordset2和field2.我的目标是与附件一起工作.但是当我尝试运行此命令时出现编译错误:

I just start to work with VBA on Access and I just want to use this type : recordset2 and field2. My aim is to work with attachment. But I got a compilation error when I try to run this :

Dim oRst As DAO.Recordset2
Dim rs As DAO.Recordset2
Dim fld As DAO.Field2

我遇到类似的错误

未定义的用户定义类型"

"undefined user-defined type"

我不知道为什么.我阅读的所有代码都使用这种类型.我误解了什么?

and i don't know why. All the code I read use this types. What have i misunderstood ?

推荐答案

您可能引用了旧的DAO库.您需要以下参考:

You probably have a reference to an old DAO library. You need this reference:

Microsoft Office 16.0 Access数据库引擎对象库

这篇关于dao.recordset2和dao.field2不可用.我收到编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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