change source object on subform using VB

  • Thread starter Thread starter gymphil
  • Start date Start date
G

gymphil

Can anyone help!
I have a main form with a subform and am trying to change the subforms
source object using:
forms.mainform.subform.form.sourceobject = "new query name"
the results is a run-time error 2465
application-defined or object defined error
 
Use:
forms.mainform.subform.sourceobject = "new query name"

It is the subform control that has a SourceObject
The form in the subform control doesn't, so it can't figure out how to
assign it.
 
Just the job gentlemen, thanks very much for your assistance.
you were quite correct! I had to change the record source.

Cheers

Phil
 
Back
Top