Hello
How can i open a form within another form??? Please see attachment
KMBT22220121017043110.pdf
Hello
How can i open a form within another form??? Please see attachment
KMBT22220121017043110.pdf
The big box would be a subform control. The code behind the buttons would set its Source Object property to the desired form.
Pbaldy
Thank you for your reply. I'm still new to access. Where can i find out more info about this???
The code would look like:
Forms!FormName.SubformControlName.SourceObject = "DesiredFormName"
I try this but it didn't work.
Private Sub Command10_Click()
Forms![F_LockBoxMainForm]![Child7]!SourceObject = "zzForm1"
End Sub
Can you post the db here?
db1.mdb
Thank you
I'm confused (not uncommon). You have the code in zzForm1, but trying to set the subform container of another form to zzForm1. Typically I'd expect a single main form with a subform container. Buttons on that main form would change/set the subform container.
I'm very confused. Not sure if we are on the same page.
ZZForm1 would be the Main form. The main form would have 5 buttons. Everytime the user would click on any of the buttons the form would open withing the main form.
But it would typically be a different form being opened within. In other words, I might have the form name "Main", I might set a subform within to a form named "Customers", then have another button to switch it to "Orders", or whatever. You have code within zzForm1 to set the subform in the other form, F_LockBoxMainForm. I guess I'm confused as to what you're trying to achieve.
I guess i was doing it wrong. So forget what i did.
What you stated in post 10 is what i want.
Main", I might set a subform within to a form named "Customers", then have another button to switch it to "Orders", or whatever
How can i go about this?????
Thank you
zzForm1 was basically set up correctly, but the code behind each button would refer to its subform instead of the other form's:
Me.Child7.SourceObject = "FormName"
That worked great. One more thing.
What would be the code to close the form?
Not the main form.
If you want to empty the subform so that there's nothing in it, try
Me.Child7.SourceObject = ""
Thank you very much.