Updating record source property on a subform

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
Back
Top