访问是子形式一部分的查询中的特定字段
我试图了解语法将在构成另一种形式的子形式的查询中访问特定字段的语法是什么。 > subform/Query>字段
我试图访问一个名为Berthed的字段,该字段作为布尔字段运行。要么存在船只,要么不存在。
这是我正在尝试的,它不起作用。
Me.Boat_Move_Prior_Week.SourceObject.berthed
在这种情况下,这是故障
me =当前表格
boat_move_prior_week =查询
berthed = field我正在尝试通过VBA
访问
我的最终目标是创建一个if语句,该表单的要求将查看泊位字段,如果检查了字段(如果检查了该字段(如果存在船只)什么都不做,但是如果该场不受组织(不存在船只),则从查询中卸下船只。
I am trying to get an understanding of what the syntax would be to access a specific field within a query that makes up a subform within another form.
Form > SubForm/Query > Field
The field I am trying to get access to a field called Berthed that operates as a Boolean field. Either the vessel is present or it is absent.
This is what I was trying and it does not work.
Me.Boat_Move_Prior_Week.SourceObject.berthed
In this case here is the breakdown
Me = current form
Boat_Move_Prior_Week = query
Berthed = field I am trying to access through the VBA
My final goal will be to create an If statement, that upon requery of the Form, will look at the Berthed field, and if the field is checked (vessel is present) do nothing, but if the field is unchecked (vessel is not present) then remove the vessel from the query.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
要到达绑定到 berthed 字段的字段(在子形式上),这是语法(假设子形式上的文本框也被称为 berthed ):
To reach the field (on the subform) bound to the field berthed, this is the syntax (assuming the textbox on the subform also is named berthed):
这里是一个惊人的指南,以了解如何处理主要形式和子形式的控件:
a>
Here an amazing guide to know how to deal with controls in main form and subforms:
Link
除了我的语法问题,我应该为该值使用false。感谢上面的两个海报使我朝着正确的方向发展。
Aside from my syntax issues I should have been using False for the value. Thanks to the two posters above for getting me in the right direction.