K Kamolas New member Local time Today, 17:18 Joined Feb 17, 2007 Messages 6 Feb 17, 2007 #1 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
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
MarkK bit cruncher Local time Today, 09:18 Joined Mar 17, 2004 Messages 8,571 Feb 17, 2007 #2 What have you tried so far that didn't work? Have you searched for "SourceObject" in Access help?
K Kamolas New member Local time Today, 17:18 Joined Feb 17, 2007 Messages 6 Feb 17, 2007 #3 Yes, but i can´t call the subform that i want to change. i have the code in the main form
K Kamolas New member Local time Today, 17:18 Joined Feb 17, 2007 Messages 6 Feb 17, 2007 #4 maybe i should use frames and not sub forms...
ShaneMan Registered User. Local time Today, 09:18 Joined May 9, 2005 Messages 1,223 Feb 17, 2007 #5 Kamolas said: 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 Click to expand... 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
Kamolas said: 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 Click to expand... 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
K Kamolas New member Local time Today, 17:18 Joined Feb 17, 2007 Messages 6 Feb 17, 2007 #6 So simple Thaks
ShaneMan Registered User. Local time Today, 09:18 Joined May 9, 2005 Messages 1,223 Feb 17, 2007 #7 Kamolas said: So simple Thaks Click to expand... Your welcome. Glad I could help. Shane