Subforms in Switchboard

M

Mat

I have created a switchboard with option buttons on Left.
I want to bring up various forms on the right hand side
dependent on whichever button is selected. I cannot get
each form to come up as a subform of the main switchboard
form - the open form command always opens the new form in
a new window. Can anyone offer advise on how I can
hide/show subforms - or suggest a better way of doing it ?
 
A

Arvin Meyer

Mat said:
I have created a switchboard with option buttons on Left.
I want to bring up various forms on the right hand side
dependent on whichever button is selected. I cannot get
each form to come up as a subform of the main switchboard
form - the open form command always opens the new form in
a new window. Can anyone offer advise on how I can
hide/show subforms - or suggest a better way of doing it ?

A subform is a control, the same as a textbox, until it gets focus. So put
an empty subform on the form and set its SourceObject property in code.

Me.NameOfSubformControl.SourceObject = "subMySubformName"
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
K

ken h

Good idea! - Hum.... You would need to make sure all your subforms were exactly the same size as the subform control...
 
A

Arvin Meyer

ken h said:
Good idea! - Hum.... You would need to make sure all your subforms were
exactly the same size as the subform control...

They don't need to be exact, but for esthetic sake, they should be close. If
the form is too small, the Detail section color will fill the empty space.
If it's too large, it will require scroll bars.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 

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