使用 MS Access VBA 以下代码适用于我:
Reports.PARENT_REPORT_NAME.CHILD_REPORT_NAME.Report.Label1.Caption = "Yes"
但是,这不会:
With Reports(PARENT_REPORT_NAME)
.CHILD_REPORT_NAME.Report.Label1.Caption = "Yes"
请问有人对我有任何见解吗?
使用 MS Access VBA 以下代码适用于我:
Reports.PARENT_REPORT_NAME.CHILD_REPORT_NAME.Report.Label1.Caption = "Yes"
但是,这不会:
With Reports(PARENT_REPORT_NAME)
.CHILD_REPORT_NAME.Report.Label1.Caption = "Yes"
请问有人对我有任何见解吗?
考虑允许对象名称的字符串引用的Reports集合和Report.Controls属性:
With Reports("PARENT_REPORT_NAME")
.Controls("CHILD_REPORT_NAME").Report.Label1.Caption = "Yes"
...
End With