469,609 Members | 1,505 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

How to maximize subforms to the size of the main form

I need to know how to maxinimze subforms to the size of the main form.
I have managed to do the code to maximize the main form, but it does not work on the subforms. The main form contains 6 subforms which I need to maximize within the main form (the screen size).
Manually setting the size of the subforms is frustrating as I have serval users of the front end, personnally on 3 different PCs (incl laptop). I regularly update the front end of the database, so I cannot physically reset each subform for each user's screen each time.
Michele
May 29 '10 #1
5 5188
ADezii
8,800 Expert 8TB
To the best of my knowledge, you can only make a SubForm as large as the SubForm Control that it is containied within.
May 30 '10 #2
I need the subform to automatically take the size of the mainform. Is it possible for the command to "read" the size of the maximized main form and after open command for the subform insert the size of the mazimized main form ?
I apologize for my lack of experience, I am a novice at code-writing.
May 30 '10 #3
missinglinq
3,532 Expert 2GB
What exactly are you referring to when you say "subform?" If a true subform is the same size as the main form, it would cover the main form, completely obliverating it.

Linq ;0)>
May 30 '10 #4
I have 6 subforms based on seperate tables that exist in one-many relationship to the main form. They have index tabs with which you can alternatively view them.

Main form contains patient details. It is the top plusminus 20% of screen.
Subforms contain eg lab results, visits, risk factors, sonar results etc.Bottom 80% of screen.

I have changed the Access options> current database>tabbed windows to overlapping windows, and then inserted the maximize command on the main form. This works.

After trying the same thing on the different subforms, the subforms do not open to the size of the main form (which is the screen size). I have tried this on "open" and "load" of subform, but they only open to their own size.

If maximize would not work on subforms, I would really like for the subform to read the size of the main form (the size of the screen) and copy this to set its own size to eg 100% of width and 80% of height, and not have to manually set each version of the front end for each screen.
May 30 '10 #5
OldBirdman
675 512MB
This may be an Access2007 issue, but I don't think so.

There seems to be a lot of terms used by the Original Poster(OP) as if they were interchangable. They are not.

Table - Set of similar records stored as fields
Form - Window to a table (or query) that presents the data from the table in a human-readable display
Control - One element of a form. May contain data from a table, from another source, or no data at all.

Tables can be related, but forms cannot. The perceived relationship between forms is not recognized by Access. Yes, there are wizards to look at the table relationships and construct WHERE clauses (filters) to limit the set of records that are available to a form. Once the wizard is done, the relationships are artificial. If changed incorrectly, Access presents the incorrect data.

Controls are the items on a form. They may be text boxes (textbox or label), yes/no (check boxes, radio buttons, or toggle buttons), buttons, and images. They may contain a single data item, either from the table (bound) or not (unbound). Some controls allow display of multiple items of data as a list or matrix. Listboxes, comboboxes, and subforms are examples.

To want to "Maximize" a control makes no sense. What would a form look like if the "Exit" command button were "Maximized"? For one thing, the form would be useless because there could not be any other controls visible. It would be impossible to reverse this "Maximize" because there could be no "Normal Size" button.

I suspect that what is searched for here is a form to display only the data somehow related to the data displayed in the main form. This would necessitate understanding Modal and Popup as well as Maximize and Normal to control this form (actually 6 forms). How the user is to Maximize this form is also a function of the properties of the form, whether the Maximize/Normal toggle is displayed in the upper-right corner with the Close button, etc.

OP needs to understand these issues. If she already does, then she needs to present the problem without the ambiguity currently present.
May 31 '10 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Jack | last post: by
4 posts views Thread by lauren quantrell | last post: by
1 post views Thread by Brandon | last post: by
3 posts views Thread by =?Utf-8?B?Qm9iQWNoZ2lsbA==?= | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.