Form sizing (keeping it correct when opening from main form)

  • Thread starter BBC via AccessMonster.com
  • Start date
B

BBC via AccessMonster.com

I have a modal subform (split form) that I open from my main form. When it
opens it is larger than even my (19"diag) display. I am able to resize it by
moving it around to get to the edges but when it reopens again it is back to
the large size. In design mode it is fine (about W 7", H 4") but is about W
20" H 12" when opened (or reopened), extra space on right and bottom. I have
played with just about every property that I think could affect sizing
(including auto-resize, fit-to-screen, -both No once sized ) but can't make
it stay at the size I need.
The forms datasheet has many fields but all but about 4 are hidden and fit
within the 7" W.
My main form is fine, stays at the size it was designed at.
thanks
 
B

BBC via AccessMonster.com

A little more info on below. I'm using Access 2007. The actual data entry
area (ie textboxes) and datasheet piece are themselves sized OK, it is just
blank space to the right of the data entry area (but is the color of the form
background all the way across). Below the datasheet is plain white past the
bottom of the screen.
BBC
 
D

Dirk Goldgar

BBC via AccessMonster.com said:
A little more info on below. I'm using Access 2007. The actual data entry
area (ie textboxes) and datasheet piece are themselves sized OK, it is
just
blank space to the right of the data entry area (but is the color of the
form
background all the way across). Below the datasheet is plain white past
the
bottom of the screen.
BBC


If you open the form in design view and look at its property shee, what is
its Width property set to?
 
B

BBC via AccessMonster.com

it's at 7.7" (the correct size) in design mode it's fine. Last night I read
about another 100 posts concerning many variants on this problem. I've tried
most of the suggesteed solutions but no change. Most relate to Auto-Size,
PopUp and Modal properties or using DoCmd.Restore or MoveSize which I've
tried most of. Some have found success with these and others not. I wonder
if in the explainations it's about getting the entire mix correct but the
responses are very pointed to one or two of the above so maybe not catching
the entire problem for everyone.
Further advice appreciated !

Dirk said:
A little more info on below. I'm using Access 2007. The actual data entry
area (ie textboxes) and datasheet piece are themselves sized OK, it is
[quoted text clipped - 23 lines]
If you open the form in design view and look at its property shee, what is
its Width property set to?
 
D

Dirk Goldgar

BBC via AccessMonster.com said:
it's at 7.7" (the correct size) in design mode it's fine. Last night I
read
about another 100 posts concerning many variants on this problem. I've
tried
most of the suggesteed solutions but no change. Most relate to Auto-Size,
PopUp and Modal properties or using DoCmd.Restore or MoveSize which I've
tried most of. Some have found success with these and others not. I
wonder
if in the explainations it's about getting the entire mix correct but the
responses are very pointed to one or two of the above so maybe not
catching
the entire problem for everyone.
Further advice appreciated !

Either the form is corrupted in some way, or there's something we're
overlooking. If you'd like to send me a cut-down copy of your database,
containing only the elements necessary to demonstrate the problem, compacted
and then zipped to less than 1MB in size (preferably much smaller) -- I'll
have a look at it, time permitting. You can send it to the address derived
by removing NO SPAM and ".invalid" from the reply address of this message.
If that address isn't visible to you, you can get my address from my web
site, which is listed in my sig. Do *not* post my real address in the
newsgroup -- I don't want to be buried in spam and viruses.
 
B

BBC via AccessMonster.com

sending via separate email

Dirk said:
it's at 7.7" (the correct size) in design mode it's fine. Last night I
read
[quoted text clipped - 9 lines]
the entire problem for everyone.
Further advice appreciated !

Either the form is corrupted in some way, or there's something we're
overlooking. If you'd like to send me a cut-down copy of your database,
containing only the elements necessary to demonstrate the problem, compacted
and then zipped to less than 1MB in size (preferably much smaller) -- I'll
have a look at it, time permitting. You can send it to the address derived
by removing NO SPAM and ".invalid" from the reply address of this message.
If that address isn't visible to you, you can get my address from my web
site, which is listed in my sig. Do *not* post my real address in the
newsgroup -- I don't want to be buried in spam and viruses.
 
D

Dirk Goldgar

Dirk Goldgar said:
Either the form is corrupted in some way, or there's something we're
overlooking. If you'd like to send me a cut-down copy of your database,
containing only the elements necessary to demonstrate the problem,
compacted and then zipped to less than 1MB in size (preferably much
smaller) -- I'll have a look at it, time permitting.

I've now worked with the sample database that BBC sent me.

The problem seems to be related to the fact that this is a split form, the
new format supported by Access 2007 with a single-form view combined with a
datasheet view. If you switch the form to single-form view, the problem
doesn't arise. The datasheet currently has a number of columns hidden, and
it looks to me as though Access is allocating form-width to accomodate the
width of the hidden columns.

If I unhide those columns and make them narrower, form width reduces.
However, I tried setting those columns' widths to zero, and that didn't
correct the problem. I worked with it for a while, trying to make the
columns very narrow and then hiding them, but I couldn't find a way to make
Access behave.

I did find a workaround: resizing the form window to the desired width in
the form's Load event. It took only one line of code:

DoCmd.MoveSize , , 11400

The number 11400 was determined empirically, by manually sizing the form and
then inspecting its WindowWidth property.

Another possible workaround would be to change to a single form view, not a
split form, and put a linked datasheet subform in the form footer. Extra
code would be needed, though, to make it mimic the behavior of the split
form. It's very doable, if the resizing solution above is not suitable for
some reason .

I can't swear that I have exhausted all design-time possibilities for
resolving this problem, but I did try a lot of variations. If anybody has a
simpler solution, I'd love to hear it.
 

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