Programmatically Change Form Height

rjp99

Registered User.
Local time
Today, 06:29
Joined
Feb 24, 2013
Messages
43
I'm trying to change the height of form using code and nothing I've tried works.

Rather than have you read a lot of words to get an understanding of my problem, please open the attached dB and:

· open the '01_EventDates_MF' form
· click the 'Go To Time Period Entry' button (at the bottom)

After you do this, you'll see a lot of 'white space' between the button and the bottom border of the form. I'm trying to remove the white space by reducing the height of the main form.

The code is in ‘01_EventDates_MF’ class module; can anybody take a look at this and offer a suggestion? Thanks much!
 
I am at a site where downloads from non-military sites are disallowed, particularly if they contain code, so I have to just give you a general comment. I can't look at your DB.

The Form.Height field is available to you, but you can NEVER shrink the form if something is in the way. If your button is at the bottom of the form, you have to move it away from the bottom before you can adjust form height.

Let's say that the button is .25" in height and is located at 5.75" from the top of the form (which is to say, its top is 5.75"). That form can NEVER be adjusted to less than 6" in height while that button is there, and trying to shrink the form will fail whether done by hand or by program. But if you know by other considerations that you COULD move the button so that its top was 4.75", you could move that button first and THEN try to shrink the height of the form to 5" if nothing else is in the way.

Remember, if you have any "invisible" controls on the form or if you have lines and images and other features, they have to be moved because the form height is always the LAST thing to be adjusted - and it CAN'T be adjusted until the way is clear for that.
 
Thank you, The Doc Man!! I was totally overlooking the invisible object. Moving it did the trick.
 

Users who are viewing this thread

Back
Top Bottom