Switching subforms

La rimo

New member
Local time
Today, 10:16
Joined
Jun 24, 2011
Messages
5
Hello. I want to be able to switch subforms when I press a button.
BUTTON1-BUTTON2-BUTTON3-BUTTON4-BUTTON5

SUBFORM1



So when I press button2, subform1 becomes subform2 and so on...

I don't know if hiding/unhiding them works. It could become very slow if all subforms were open in the background.
 
So long as you don't need to change the Link Master Fields/Link Child Fields properties of the subform (which you can't do at runtime) you can change the source object of a subform at runtime to any form you like.

Me.Child1.SourceObject = "Form1"
Me.Child1.SourceObject = "Form2"
 
Perhaps I should have said that I have never written or studied VBA or whatever that is called.

I have made a couple of working databases that fit my own purposes without it.

So, if possible, could you describe it a bit more. Thanks anyway.


By the way, the buttons are on form header, subform is located on form details.
 
I just create Tab Group in Main Form which easy for me to insert many Tab Page i want as subform.

You just have to drag and drop your form which you need as subform inside the Tab Page in your Main Form when in Design mode.

Thanks,
Niel
 

Users who are viewing this thread

Back
Top Bottom