reference a control in a subform in a query

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!
 
M

Marshall Barton

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.)
 
H

hollyylloh

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.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top