Change subform sourceobject

Kamolas

New member
Local time
Today, 18:41
Joined
Feb 17, 2007
Messages
6
Hi

I have a form with several sub forms and i would like that when I press a commandbutton the source object of one of the sub forms change.

Can anyone help?

Thaks
 
What have you tried so far that didn't work? Have you searched for "SourceObject" in Access help?
 
Yes, but i can´t call the subform that i want to change.
i have the code in the main form
 
Hi

I have a form with several sub forms and i would like that when I press a commandbutton the source object of one of the sub forms change.

Can anyone help?

Thaks

Hey Kamolas,

I think what your looking for is this. On the cmdButtons OnClick event try this:
Me.subFormName.SourceObject = "NameOfForm"

Put the name of the form that you want to use as your SourceObject inside of parenthesis.

HTH,
Shane
 

Users who are viewing this thread

Back
Top Bottom