Open form in a Subform based on cbx

steve1111

Registered User.
Local time
Today, 04:10
Joined
Jul 9, 2013
Messages
170
I have a main form with a combobox with 12 different names of 12 different forms. I know how to open the forms based on the combo box, but is there a way to rather than have the form open in normal, dialog, etc. view that it can open in a subform that i placed in the main form?

Practical explanation: I have 12 users in the cbx and 12 different custom forms for each, so i want the user to select their name and see their custom options right there in a subform in the main form.

is any of this possible with limited VBA code (still working on learning that)?

Thank you
 
Create a subform control - let's call it SFCtrl

then in your combo(I've called it myCombo) after update event instead of using docmd.openform, use

SFCtrl.sourceobject=myCombo

Edit - you need to make sure the subform is of sufficient size (look at the resize event), also you may need to set the linkchild/linkmaster properties to nothing or something depending on how you are using the form
 
once again CJ a huge help and breaking it down so a novice can follow, works great!
 

Users who are viewing this thread

Back
Top Bottom