From: Simon on
I am buiding a query that will query information based on some text
that is entereed with in a subform

I know the code is for using text on a form
[forms]![frmSearchProducts]![ProductSearch]

Buti can nor remeber the code for then the text is in a subform
(frmSearchProductsSubform)


Thanks

Simon
From: Allen Browne on
Try:
[forms]![frmSearchProducts]![Sub1].[Form]![ProductSearch]

For an explanation of the .Form bit, see:
Referring to Controls on a Subform
at:
http://allenbrowne.com/casu-04.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Simon" <S.Dickson(a)shos.co.uk> wrote in message
news:70779a42-d2d0-416a-8f38-25b3d5c3b54b(a)m3g2000hsc.googlegroups.com...
>I am buiding a query that will query information based on some text
> that is entereed with in a subform
>
> I know the code is for using text on a form
> [forms]![frmSearchProducts]![ProductSearch]
>
> Buti can nor remeber the code for then the text is in a subform
> (frmSearchProductsSubform)
From: Brendan Reynolds on
"Simon" <S.Dickson(a)shos.co.uk> wrote in message
news:70779a42-d2d0-416a-8f38-25b3d5c3b54b(a)m3g2000hsc.googlegroups.com...
>I am buiding a query that will query information based on some text
> that is entereed with in a subform
>
> I know the code is for using text on a form
> [forms]![frmSearchProducts]![ProductSearch]
>
> Buti can nor remeber the code for then the text is in a subform
> (frmSearchProductsSubform)
>
>
> Thanks
>
> Simon


Forms!NameOfMainForm!NameOfSubformControl.Form!NameOfTextBox

The thing to remember here is to use the name of the subform *control* which
may not be the same as the name of the form that it contains. Look at the
properties of the subform control in design view to determine the name.

--
Brendan Reynolds