Access 中的 OpenArgs 问题
我有这样的代码:
Dim strResponses As String
strResponses = Forms!frmResponses.QstnID.OpenArgs
If Len(strResponses) > 0 Then
Me![QstnID].DefaultValue = Me.OpenArgs
End If
当我运行它时,它给出错误 438。有人可以帮助我知道错误在哪里吗?
I have a code like this:
Dim strResponses As String
strResponses = Forms!frmResponses.QstnID.OpenArgs
If Len(strResponses) > 0 Then
Me![QstnID].DefaultValue = Me.OpenArgs
End If
When I run it, its gives error 438. Can someone help me to know where the error is?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
当然应该是:
或者
只有表单以及在更新的版本中的报告具有 OpenArgs 属性,因此,我想,错误“对象不支持此属性或方法”。
Surely that should be:
Or
Only forms, and in more recent versions, reports, have an OpenArgs property, hence, I imagine, the error "Object doesn't support this property or method".
线路上是否发生了错误 438:
如果作为测试,您尝试将
Me![QstnID].DefaultValue
设置为其他内容,会发生什么情况?例如那么,问题肯定与 OpenArgs 有关吗?
Is the error 438 happening on the line:
What happens if, as a test, you try setting
Me![QstnID].DefaultValue
to something else? e.g.So, is the problem definitely connected to OpenArgs?
要知道您的错误在哪一行,您可以执行以下操作
您也可以使用 MZ-Tools对于 VBA 插件,一旦参数正确,只需点击几下即可完成此操作。您还可以检查这个更完整的答案: ms-access-vba-and-error-handling
to know on which line is your error, you can do the following
you can also use the MZ-Tools for VBA add-in, that could do this for you in a few clicks, once correctly parametered. You can also check this more complete answer: ms-access-vba-and-error-handling