Proble with form size

In my 2007 database, i have a main form which call other forms, all of them works fine, but from time to time when i call a form, the forms open really small that i can eve resize it, i really do not know why, i play with the properties, like Modal, Auto Size, border stile, Popup, etc. But they seem to work and them happens again.
I change the way i open the form(vba/ macro), but it's still happening from tiem to time.
Some time if i open the form directly without the min form sometimes hapens, sometimes doesn't.

Any idea what could be causing this.

Best regards
Who is Participating?
ldunscombeConnect With a Mentor Commented:
Not sure if it's what you are after but but a trick that I use quite often is to set the forms size and position in the OnActivate event of my forms. That way every time a form becomes active it is displayed how I intended.



titorober23Author Commented:
how do i specified a specific size and position?
because it seems that doe snot matter what i specified in the properties, bcause any way it changes from time to time.
You don't do it in the property sheet of the forms you do it via code in the OnActivate event, that way it is set automatically every time the form is activated.

Open the form and size it how it should be.
Save the mdb.
View the form in design mode.
Access the LOAD event.
Open the Immediate window and type:
Print appliction.forms("yourformname").insideHeight

This will show you the InsideHeight value to use.
In the LOAD event type:
Application.forms("YourFormName").insideHeight = xxxx   (xxx being the value from the immediate window).
Repeat for InsideWidth

This forces the form size always.

Scott C
RomoloIT Professional ConsultantCommented:
I too have experienced this... it seems to be a Microsoft Feature :)

What you need to do is place a button on the form to find out exact sizes and put the following code within that button


This will give you a list of numbers of its current position (This is providing you can load form correctly.. run it in Access2003 :)

Then on open event of the form...

place the following with the values you got from msgbox

CONTROLORFORMNAME.Move 4648, 1820, 1000, 300

This will guarantee its in the right place everytime it loads

Its a real pain when ACCESS2007 does this... tbh... I develop in Access2003 then upgrade

BECAUSE Access 2007 does not have enough to warratn development in vs troublesome less userfriendly interface.

Still use Access for full system development or as Pilot system

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.