append queries from subform criteria

S

Simon

i have a Append query that works fine, within the criteria of the query
depends on a number that is on the open form.

This critiea workd fine [Forms]![frmManufactureTub]![HotTubCode]

Now instead of the looking for the number on the form i would like it
to look for the number within the subform within the form

I tried [Forms]![frmManufactureTub]![HotTubCode] but this does not work

do i have to change the criteriafor when i want ti to take a value from
a subform


Thanks
 
D

Douglas J. Steele

First, determine the name of the control on the main form that contains your
subform. (Depending on how you added the subform, it may be different than
the name of the form being used as a subform)

To refer to a control on the subform, you use:

[Forms]![NameOfParentForm]![NameOfSubformControl].Form![NameOfControlOnSubform]
 

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