Sub Forms ?

C

Chris

Are sub forms active in the current form? Meaning can I
apply a SQL statement to them to be able to filter another
form based on what the sub form is showing on the main
form? I hope you follow.

Here is the SQL statement I am trying to apply. The Where
clause is referring to the sub form in my main form.

Thanks for your help,

-Chris
 
A

Allen Browne

Chris, we have not found that approach to be very stable.

If possible, the simplest solution would be to include the field from the
main form in the subform's LinkMasterFields, and the matching field from the
subform in the LinkChildFields.

Where that is not possible, what we do is to use the Current event of the
main form to build a SQL string, and assign it the RowSource for the
subform. This results in the filtering of the subform whenever the main form
changes record, without the instabilities you get from trying to embed
references to the main form and rely on the Expression Service to resolve
them.
 

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