Updating record source property on a subform

G

Guest

Hi,

Can anyone tell me how to update the record source property on a subfrom
from the parent form when the subform is contained within a tab control. It
seems like it should be an easy thing to do but I can't seem to work it out.

Thanks

Mike
 
A

Allen Browne

The tab control does not come into the reference, so if the code is in the
main form, use:
Me.[Sub1].Form.RecordSource = strSql
where Sub1 represents the name of your subform control.

Note that Access may change the LinkMasterFields and LinkChildFields
properties of the subform control also, so you may need to reset these.
 

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