VBA引用一个字段的形式,有一个点在其名称 [英] VBA reference a field on form that has a dot in its name
本文介绍了VBA引用一个字段的形式,有一个点在其名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在一个Access 2010项目的工作,我创建了一个形式,我使用if语句来启用/禁用领域。
I am working on an Access 2010 project, I have created a form and am using an if statement to enable/disable fields.
在code我现在用的就是,
The code I am using is,
DueDate.Enabled = False
这是一个从组合框被称为tblJobs.Engineer工作正常,除了我不能重命名这个领域,但我认为这个问题是点中它作为我得到所需的错误对象。
This is working fine apart from a combo-box called "tblJobs.Engineer" I can't rename this field but I think the problem is the dot in it as I'm getting error object required.
我已经尝试添加表格!frmJobs!
的开始,但它仍然得到同样的错误。
I have tried adding Forms!frmJobs!
to the start but it is still getting the same error.
推荐答案
支架问题名称,因此它可以被识别为一个东西。
Bracket the problem name so it can be recognized as one "thing".
[tblJobs.Engineer].Enabled = False
这篇关于VBA引用一个字段的形式,有一个点在其名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文