Change subform source ojbect.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Help! How do I change the subform "Main subform" source object to "test1
subform"? programatically. I can find code to change the record source, but
I actually want to change the source object instead.

Thanks for your help.
 
Many thanks. I tried the post and encounter a runtime error:

Runtime 2465
Microsoft Office Access can't find the field 'l' referred to in your
expression.

When I click on debug, that line is highlighted

Ofer said:
Try this
me.[SubFormName].sourceobject="NewSource"


Ray Mead said:
Help! How do I change the subform "Main subform" source object to "test1
subform"? programatically. I can find code to change the record source, but
I actually want to change the source object instead.

Thanks for your help.
 
Nevermind. I fixed the problem. Thanks for the solution!!!

Ofer said:
Try this
me.[SubFormName].sourceobject="NewSource"


Ray Mead said:
Help! How do I change the subform "Main subform" source object to "test1
subform"? programatically. I can find code to change the record source, but
I actually want to change the source object instead.

Thanks for your help.
 
What was the problem out of curiousity? I'm about to build a form
critical to my database and was thinking of using this technique.

Ray said:
Nevermind. I fixed the problem. Thanks for the solution!!!

:

Try this
me.[SubFormName].sourceobject="NewSource"


:

Help! How do I change the subform "Main subform" source object to "test1
subform"? programatically. I can find code to change the record source, but
I actually want to change the source object instead.

Thanks for your help.
 
Back
Top