Referencing A sub form from Another subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a Main form with 2 subs. One sub has a list of items. When I click
an item I want the second sub to change its recordsource to relect that items
components. How do I reference that second subs recordsource? Both subs are
on top of the main.
 
Shane said:
I have a Main form with 2 subs. One sub has a list of items. When I click
an item I want the second sub to change its recordsource to relect that
items
components. How do I reference that second subs recordsource? Both subs
are
on top of the main.

In the first subform:

Me.Parent.SecondSubformControlName.Form.RecordSource = "new record source"

Carl Rapson
 
You could make the subform nested in the other subform, then the records
shown would change automatically through your linked fields...

Alternatively, you could use some event in one form to set the recordsource
property of the other form: Parent.NameOfForm.Recordsource = [your data]

Not sure if it would work in your situation, but you could have the second
subform based on a query whose criteria is the list the user is selecting
from (combo) then you could just requery the second subform in the combo's
AfterUpdate event.

Steve
 

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

Back
Top