reference a control in a subform in a query

  • Thread starter Thread starter hollyylloh
  • Start date Start date
H

hollyylloh

I have found several answers to this question but I can not made them work
for me.

I have a query that needs to reference a value on a subform. I have tried
this in the query criteria:

[Forms]![frmAccounts]![AcctData subform].form![PSID]

Which defaults to this:

[Forms]![frmAccounts]![AcctData subform].[form]![PSID]

I have also tried this:

[Forms]![frmAccounts].[AcctData subform].[form].[PSID]

and various crazy variations in syntax

Please help!
 
hollyylloh said:
I have found several answers to this question but I can not made them work
for me.

I have a query that needs to reference a value on a subform. I have tried
this in the query criteria:

[Forms]![frmAccounts]![AcctData subform].form![PSID]

Which defaults to this:

[Forms]![frmAccounts]![AcctData subform].[form]![PSID]

I have also tried this:

[Forms]![frmAccounts].[AcctData subform].[form].[PSID]


All of those are valid syntax so I am inclined to think that
the form text box is not named PSID or the subform
**control** (the container for the form displayed as a
subform) is not named [AcctData subform]. (The subform
control does not have to have the same name as the form
object it displays.)
 
Thank you very much Marshall. The subform was called frmAcctData subform.



Marshall Barton said:
hollyylloh said:
I have found several answers to this question but I can not made them work
for me.

I have a query that needs to reference a value on a subform. I have tried
this in the query criteria:

[Forms]![frmAccounts]![AcctData subform].form![PSID]

Which defaults to this:

[Forms]![frmAccounts]![AcctData subform].[form]![PSID]

I have also tried this:

[Forms]![frmAccounts].[AcctData subform].[form].[PSID]


All of those are valid syntax so I am inclined to think that
the form text box is not named PSID or the subform
**control** (the container for the form displayed as a
subform) is not named [AcctData subform]. (The subform
control does not have to have the same name as the form
object it displays.)
 
Back
Top