Avatar of bejhan
bejhan asked on

Changing and Retrieving Form Size

How can I retrieve the size of a form window that I have resized (via sizeable borders)? The reason I want to do this is because there is a whole bunch of hidden stuff on the right side of the form that only shows if a certain item is selected from a combo box. So I want to have the form start at the size that I have sized it to and change once that stuff becomes visible and change back if a different item is chosen from the combo box.

I was thinking of using DoCmd.MoveSize to resize the window, will this work?

Also is there a way to call autocenter from vba code?
Microsoft Access

Avatar of undefined
Last Comment
bejhan

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
flavo

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
nexusnation

Me.Move helps you move around the form, but it doesn't help you resize it. For that, you need to use the InsideWidth and InsideHeight properties:
http://msdn.microsoft.com/en-us/library/aa196143(office.11).aspx
nexusnation

You may have to use InsideWidth/Height in conjunction with what Dave mentioned, WindowHeight/Width, to achieve whatever exactly your desired effect is.
ASKER
bejhan

Actually in this case I was able to use Me.Move to resize and reposition.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23