简体   繁体   English

选项卡式控件上的MS Access 2007参考子窗体控件返回null

[英]MS Access 2007 reference subform control on tabbed control returning null

I have a subform reference returning Null where the textbox has a value in it. 我有一个返回Null的子窗体引用,其中文本框具有一个值。 The code I am using is: 我使用的代码是:

End Date: [Forms]![ReportCentre]![NavigationSubform].[Form]![txtEndDate]

This is in a tabbed control, but I could not find the .Pages property referred to in a similar question. 这是在选项卡式控件中,但是找不到类似问题中提到的.Pages属性。

The subform being referenced is [LODForm], and the tab control (page area) is [NavigationSubform] 被引用的子表单是[LODForm],而选项卡控件(页面区域)是[NavigationSubform]

Why is this returning Null? 为什么返回Null?

The subform belongs to the form, not the tab control. 子窗体属于窗体,而不是选项卡控件。 The tab control only hides/displays other controls. 选项卡控件仅隐藏/显示其他控件。 And you will reference the subform control, not the subform. 您将引用子窗体控件,而不是子窗体。 Thus: 从而:

End Date: [Forms]![ReportCentre]![NameOfYourSubformControl].[Form]![txtEndDate]

Inserted name of subform control: 插入的子窗体控件的名称:

End Date: [Forms]![ReportCentre]![NavigationSubform].[Form]![txtEndDate]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM