Make a button open a form within a form

A

Andy

I Have a Menu type of form, and would like when I press a
button I would like it to open another form (also a menu)
but on the same page (form). Then get another button to
open another form on the same, so you get kind of sub menu
which changes with the push of a button.

Cheers all.
 
A

Allen Browne

In the Click event procedure of your command button, set the SourceObject
property of the subform to the name of the form you wish to load into the
subform.
 
A

Andy

I'm sorry but I don't understand that, I have clicked the
[...] button next to the onClick box, but it displays the
VBA, can it be done through the expression commands??
 
R

Reggie

Andy, After you click the [...] next to the onClick event type in the
following changing the names to the names of your controls


Private Sub cmdSourceChange_Click()
Me.MyFormName.SourceObject = "MyOtherFormName"
End Sub


--
Reggie

----------
Andy said:
I'm sorry but I don't understand that, I have clicked the
[...] button next to the onClick box, but it displays the
VBA, can it be done through the expression commands??

-----Original Message-----
In the Click event procedure of your command button, set the SourceObject
property of the subform to the name of the form you wish to load into the
subform.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.




.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top