Referring to a Subform from a Query

前端 未结 1 906
臣服心动
臣服心动 2021-01-26 15:19

In MS Access 2010, I have a Query which quotes the following in the Criteria;

[Forms]![frm_Add_Item_Subform].[ActiveControl].[Caption]

This let

相关标签:
1条回答
  • 2021-01-26 15:44

    This is how to refer to subforms:

    Forms!mainFrm!subFormControlName.Form
    

    so you need:

    Forms!mainFrm!subFormControlName.Form.ActiveControl.Caption
    

    where subFormControlName is the name of the subform control (not the name of the subform) in the main form (it shows when the subform control is selected in the main form)

    0 讨论(0)
提交回复
热议问题