Open subform as a separate form?

S

Stephen Glynn

For reasons of space on my main form, I'd like to have my subform --
which is set up and working -- open as a separate form when the user
clicks a command button. How do I do this, keeping the parent-child
relationship between fields intact? IOW, I want it to behave just as
it is in relation to the active form, but to be a separate form that can
only be opened from my main form and which opens at the appropriate
record, allowing me to make new entries in the child part of the form.

Steve
 
J

John Vinson

For reasons of space on my main form, I'd like to have my subform --
which is set up and working -- open as a separate form when the user
clicks a command button. How do I do this, keeping the parent-child
relationship between fields intact? IOW, I want it to behave just as
it is in relation to the active form, but to be a separate form that can
only be opened from my main form and which opens at the appropriate
record, allowing me to make new entries in the child part of the form.

Steve

You can do this with a modest amount of VBA code, but there's a
probably better alternative: put a Tab Control on your form.

Put all of the non-subform controls on one page of the tab, and the
subform on the second page. This lets you share the screen real estate
while preserving the automatic (and codeless!) master/child link.


John W. Vinson[MVP]
 
G

Guest

Another way you can do it is by basing your subform (which is now a form) on
a query with the appropriate criteria based on your main form. Then put a
button on your main form to open the subform. If you need data from the main
form to be added to records on the subform just refer to the fields on the
main form in your default values.

Hope this helps.
 
S

Stephen Glynn

John said:
You can do this with a modest amount of VBA code, but there's a
probably better alternative: put a Tab Control on your form.

Put all of the non-subform controls on one page of the tab, and the
subform on the second page. This lets you share the screen real estate
while preserving the automatic (and codeless!) master/child link.


John W. Vinson[MVP]

Thanks. That seems to do the trick. One question -- possibly a minor
point -- but is it possible to change the size/typeface of the page
caption on each Tab Control? Some of the people who'll be using this
are visually impaired, so all the other controls and labels are in a
larger typeface. It's not the end of the world if I can't do change
the page caption's format to match, but it would be nice to.

Steve
 
R

Rick Brandt

Stephen said:
Thanks. That seems to do the trick. One question -- possibly a
minor point -- but is it possible to change the size/typeface of the
page caption on each Tab Control? Some of the people who'll be
using this are visually impaired, so all the other controls and
labels are in a larger typeface. It's not the end of the world if I
can't do change the page caption's format to match, but it would be
nice to.
Steve

Not per-page, but you can change the font for ALL the pages. Just have the
entire TabControl selected and then use the same font tools in the toolbar
that you would for a TextBox.
 
S

Stephen Glynn

Rick said:
Stephen Glynn wrote:




Not per-page, but you can change the font for ALL the pages. Just have the
entire TabControl selected and then use the same font tools in the toolbar
that you would for a TextBox.

Thanks. That's great. One more question. How do I change the back
colour? I can change it for everything but the background of the
caption itself by altering the section background colour. Do I need to
create a bitmap image in the appropriate colour with the caption on it
and then set that as the Picture property for the page, or is there an
easier way to do it?

Steve
 

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