Refering to a subform from another subform in code

G

Guest

I have a form with no recordsource that has two continious forms on it. We can
call them fsub1 and fsub2. I have code underneath the fsub1.OnCurrent to
update the recordset on fsub2. Here's what I've tried:
Me.Parent.Controls("fsub2").Form.RecordSource = sSQL
Forms!frmInHouseInventory!fsub2.Form.RecordSource = sSQL
Forms("frmInHouseInventory").Controls("fsub2").Form.RecordSource = sSQL

I keep getting error #2455. Invalid reference to a form.

TIA
--Warmy
 

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