vba - 在 QueryDefs 中找不到 RecordsetType 属性作为有效属性
问题描述
我正在尝试将我的查询锁定在我的 MS Access 2016 前端,以便用户只能看到查询的快照,而无法编辑 SQL 代码或查询中的数据。但是我的 VBA 代码遇到了问题:
'Lock queries
For Each oQD In CurrentDb.QueryDefs
'If Left(oQD.Name, 3) = "qry" Then
If Left(oQD.Name, 1) <> "~" Then
Set oProp = oQD.Properties("RecordsetType")
If Err Then
Set oProp = oQD.CreateProperty("RecordSource", dbText, "Snapshot")
oQD.Properties.Append oProp
Else
oProp.Value = 2
End If
End If
Next oQD
返回运行时错误“3270”:找不到“RecordsetType”的属性。有人能帮忙吗?
解决方案
推荐阅读
- javascript - 如何在这个 B+tree 中优化实现 Stack 和 Queue 操作?
- ruby-on-rails - 由于 500 错误,部署到 Heroku 后资产未加载
- kubernetes - EKS - NLB 在负载测试期间未在 2 个 pod 之间分配流量
- html - 英雄形象未居中
- unix - 排序忽略小于和大于字符
- r - 如何比较R中数据框中同一列中的特定行?
- excel - 如何对不包含特定值的单元格求和
- python - Pandas Dataframe:删除行但它们仍在 value_counts()
- jquery - 从自定义 API Woocommerce 获取 CITY/AREA 动态字段
- java - 二进制 XML 文件第 73 行:膨胀类按钮时出错