Fixing the heigth of a pop-up form

Tiger955

Registered User.
Local time
Today, 20:09
Joined
Sep 13, 2013
Messages
140
Since many years I "fight" with pop-up forms, as in endless view I cannot figure out HOW to fix the heigth.

Some forms keep a height which was set by the System and it is suitable others have the full hight of the Screen and I cannot find any Setting which can influence them.

Please let me know how to define or to fix the heigth.

It only works when I set the border to "changeable", but not when I want to fix a heigth by Setting the border to "Dialog"

Thanks a lot!
Michael
 
I think if you set the forms size (ie the checkered background) to the size you want, then click "save" for the form, the form should open at that size.

if not then add code to the forms open event

runcommand accmdsizetofitform

which will force it to open to exactly the right size, as long as you are not in full screen mode.
 
Hi Dave!

I think I used all ways to do it - exept doing it by code.

I will try this.
I always wonder, why I did not read about this "bug" (for me it is a bug for many versions of Access and I work with it since Version 2.0 !!! back in the early 90s).

Wondering why in some fomrs it seems to work in others I cannot manage it not by the life of me!

Thanks
Michael
 
..
Wondering why in some fomrs it seems to work in others I cannot manage it not by the life of me!
Never discovered that - do you've some sample in a database you could post?
 
Some forms it does work, some it don't.

If you save the form then go into design view, it loses the previous save, and outsizes again when you view in form view once more. I always use the
Code:
DoCmd.MoveSize
on the forms load...

The size are Twips - (Twentieth of an inch points) so even @ 5200 height, on a screen @ 1080 res, you will only see the form at quarter of the screen height)


Have Attached an example...

It works well for me.
 

Attachments

  • MoveSize.jpg
    MoveSize.jpg
    11.3 KB · Views: 237
Sorry if this is too elementary, it is not to be condescending, but I simply can not recognize what you're describing about loosing the size setting! :)
attachment.php
 

Attachments

  • Border.jpg
    Border.jpg
    83.7 KB · Views: 1,121
Hi JHB, not condescending at all :D

It mostly happens with continuous forms, so at most you'll only ever see 5 rows in total (page header & footer), along with form header and footer, and the form itself... in design view at least, where in the detail section you can only adjust the width.

the height characteristics in this instance take on a whole new meaning.. at least for me and Tiger995 and I'm sure many others too.

Attached is a form I scrapped because of bad design, but when opening, it opened over and above the screen size so I made the border sizeable, resized and saved it, and all was well each time I opened it.
If I went into design view, and changed something, and saved and closed it, it would open up above screen size once more.
I've had to force new size with docmd.move size,,, #### and it opens up each time at the size I want.

if there's an easier way... I'm always appreciative of yours and others advise :D
 

Attachments

  • screen.jpg
    screen.jpg
    60.8 KB · Views: 195
yes.

runcomnmand accmdsizetofitform does not necessarily give you what you want with continuous forms.

What I alternatively do is something I picked up from the "Access Cookbook" years ago. On form open/close I read/save the last known position and size of the form, so that it opens to the last size it was when you closed it.

The technique they used was to save the form position in the registry, and that's what I do. you could use a table.
 
@Dave

Well, a way of doing it.
But isn't it a shame that MS does not provide an easier way to reach the goal?
 

Users who are viewing this thread

Back
Top Bottom