Open a form within a subform

  • Thread starter Thread starter Preston Davis
  • Start date Start date
P

Preston Davis

I have a form I want to open using a command button, but have it open with in
the margins of a subform.

It open in a full screen view now, this is not good.
 
I have multiple forms that open on the main form (on separate pages). We also
have a slow network, so when we advance from one record to the next, there is
a great deal of lag time as each query is ran and each form is opened.

A command button will allow me to open each form as it is needed. But each
form will need to open within the boundaries of the sub-form (page) on the
main form.

I've looked for a parent - child relationship, but I must be setting it up
wrong as this option does not appear.
 
Preston -

The parent/child relationship only opens up if you are putting a subform on
a form (or on another subform).

I get the feeling your problem isn't just how to open a form in a subform,
so maybe we should understand what your main problem is - is it really
performance?

Are you trying to open many forms within the subform (but one at a time)?
Or are you changing your current design for speed purposes so you can have
one main form, and using the button you want one of several subforms to open?
Does this mean the user will direct which subforms they want to see?

If you are having problems with performance, then there may be other
solutions for you to look at. Maybe you want to precede the main form with a
form that has the user select just one record. Then the main form can load
with just that record, as well as all the related data in the subforms on the
other pages. This way you don't bring all the data over the network into
Access - just the record(s) you need to see.

If you post your table structure and what you want to see, we could help
more. For example, does each of your subforms pull data from a different
table or query? Or do several of them come from the same record source, but
you want them on different forms for user presentation? Maybe some of the
record sources (queries) could be made more efficient.
 
My troubles are with lots of lag time, when we move from one record to the
next. The current form loads all the fields from each sub-form as you move
from one record to the next.
We also have a very slow network, but there is nothing I can do about that.

My goal is to advance to the next record (usually from a find macro) and
have the mainform open with out each sub-form run a query and open. All the
sub-forms run off the same query, would it only run the query once, or does
it run for each form opening?

I have been able to place a command button on the page for a sub-form and
have the command button open the form. But I prefer to have the form actually
work as a sub-form and open as a linked form to that page on the mainform.

When the form opens, it opens as a full screen document. If I could get it
to open the size and location that I want, this would be great. I've tried
the macro for move/size and it did not work.

Preston
 
Preston -

I don't understand the 'all sub-forms run off the same query' I was
visualizing one main form with a subform, and you wanted to open another form
withing the margins of the subform. If you have multiple subforms, each with
the SAME query as a record source, then a better solution would be to have a
single subform that has multiple tabs to display the different portions of
the single query. This way the query runs once to populate all the tabs, not
one query for each tab.

It would be easier to understand if you gave us an idea of your data and
form structure, and what the needs are.

(FYI, I will be out of reach from early afternoon tomorrow through all of
next week, so it would be great to get this done today, or if it goes past
tomorrow morning, make a new post so someone else can help you out...)
 
Back
Top