Changing recordsource in one subform from another subform

  • Thread starter Thread starter Rod
  • Start date Start date
R

Rod

From mySubform1 I want to change the recordsource of mySubform2


something like this

Me.Parent.mySubform2.RecordSource=mySQL


Can't get it to work though

many thanks
 
Rod said:
From mySubform1 I want to change the recordsource of mySubform2


something like this

Me.Parent.mySubform2.RecordSource=mySQL


Can't get it to work though

many thanks

Any errormessages?

The usual stuff here, is that you need the subform control name, which
can differ from the name as viewed in the database window. Typically
you can find the correct reference when playing with the expression
builder, doubleclicking down to the subform recordsource.

Then, you also need the Form keyword.

Me.Parent!mySubform2.Form.RecordSource=mySQL

Another issue, is if you try to assign this in an event where the
subform isn't fully loaded yet.
 

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