Another helpful trick is to design the subform control so that it is small
enough that the user with the least resolution won't be opening the mainform
with the control being large enough to warrant the main opening with any
scrollbars. When done like this and the width/height properties are changed
on open, in a normal environment the user shouldn't see any evidence that the
subform was ever any smaller than what the table setting is.
However, if in design view the control is large enough to warrant a
scrollbar in the main form, the user may see a flicker of a scrollbar before
everything is resized accorindingly.
Sample code:
Private Sub Form_Open (Cancel As Integer)
Me.Subformcontrol.Width = _
DLookup("fldSubWidth", "tblUserSettings", "UserID = " & UserID)
Me.Subformcontrol.Height = _
DLookup("fldSubHeight", "tblUserSettings", "UserID = " & UserID)
End Sub
--
Jack Leach
www.tristatemachine.com
"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
"Jack Leach" wrote:
> I just got done doing this 
>
> In the mainform, on open, use dlookup or the like to get the default size
> for that user. Then change the width and height properties of the subform
> control accordingly. This should happen fast enough that the user never sees
> any evidence, and you can update the table that holds the current size for
> that user on the mainform close, just in case they change their mind and set
> it to something else.
>
> hth
> --
> Jack Leach
> www.tristatemachine.com
>
> "I haven't failed, I've found ten thousand ways that don't work."
> -Thomas Edison (1847-1931)
>
>
>
> "(E-Mail Removed)" wrote:
>
> > I have two unbound combos on a form that allow the user to change the
> > size of a sub form. Some users' computers are set at different
> > resolutions and I want to allow the user to maximize the size of a
> > rather wide sub as much as possible.
> >
> > It all works wonderfully.
> >
> > But the catch, as you may have realized, is that they will have to
> > adjust the size every time they enter the form. Many may have it open
> > all day but they will find it annoying nonetheless.
> >
> > I don't believe there is a way for the form to change the value on
> > close, right?—so that is out.
> >
> > My next idea would be to save the values in a table on everyones'
> > frontends.
> >
> > If that is the way to go, what would be the code to change the subform
> > size on open?
> >
> > (I will create a form that only allows one record to fill in this
> > table. The form can have on it columns called "WidthEntryfrm" and
> > "HeightEntryfrm" and be called EntryFormSettingstbl.)
> >
> > If there is a better solution, please let me know.
> >
> > Matt
> >