Dynamically update subform (unbound) in code

  • Thread starter Thread starter Marcel K.
  • Start date Start date
M

Marcel K.

MVP's

I have an unbound form, then add subform of an existing
standalone form which has a select statement as
a 'recordsource' I want to dynamically update this
recordsource value on subform with a value from control on
the main form. However, once this stand alone form gets
added to main form as a subform, the recordsource property
is no longer exposed.

The idea here is that the subform needs to update when the
main form changes - both forms are unbound as well... Any
input would be most appreciated.

Thanks.
 
However, once this stand alone form gets
added to main form as a subform, the recordsource property
is no longer exposed.

I'm not sure I follow you. Recordsource should still be available. Are you
using the '.Form.Recordsource' suffix?

?Forms("Customer Orders")("Customer Orders Subform1").Form.Recordsource
Orders

-- Dev
 
Also, after you have worked out how to update the
recordsource property of the form of the subform
control, I think you will see that you may have to
set the Master/Child link fields. In some
cases I think see these fields automatically updating!

(david)
 
Back
Top