Form size reduction beyond content

randle

Registered User.
Local time
Today, 16:33
Joined
Jun 16, 2010
Messages
57
Hi

I have done a search but can't find a thread relevant to my specific issue.

I have a form which opens in a separate window centrally on the screen. The content of this form extends the full height of the screen but want to restrict the height to a fixed size yet when attempting to drag the frame in design view to make this smaller it won't resize and adjusting the height property manually doesn't take.

This is obviously not happy to reduce the size of the form smaller than the content and have tried changing a few properties which I thought may affect this but still no joy.

It's going to be something simple I know but often what you would think simple in Access isn't ;)
 
It's going to be something simple I know but often what you would think simple in Access isn't ;)
Set the size in design and turn off the Auto ReSize property of the form perhaps? ;)
 
You could try using the form.move property in your OnOpen event

forms("FORM1").move(X,Y,Width,Height)
 
You could try using the form.move property in your OnOpen event

forms("FORM1").move(X,Y,Width,Height)
If the property I mentioned above is set to No, it will retain the dimensions set in design view. No need for resizing in code.
 
The Auto ReSize Property has already been set to "no" and changing the height manually just springs back to the ful size when clicking off the property. Sorry should have been more specific. This is what I meant when I said I had changed a few properties already!
 
Upload a stripped down version of your db with the problem for and we'll have a look.
 
Set form AutoResize property to no. Open the form in design mode, size it, and SAVE it. When you open the form, you should see it opens at the desired size.

Another thing you can do is manipulate the form.InsideHeight property at runtime.
 
I've been asked to upload a stipped down version of a database before and thinking I had, I was told I hadn't done this properly....Felt a little naughty ;) Is there anything special I need to do to the database before I upload it?

@Peter D: As mentioned the AutoResize property is already set to "no" and attempting to drag the form footer or manually enter a property height results in the form and value snapping/switching back to full size!
 
...when attempting to drag the frame in design view to make this smaller it won't resize...

(Access) is obviously not happy to reduce the size of the form smaller than the content...
This is the nub of the problem, I think; Access simply will not allow you to design a Form in such a way that Controls are excluded.

To my mind, the pertinent question here is "Why would you want to?" Designing a Form so that the user has to scroll, in order to view all parts of it, is considered by most developers to be one of the most user-unfriendly things you can do!

Perhaps if you could give us a little more info as to what this form is being used for we could give you an alternate way to satisfy all of your requirements.

Linq ;0)>
 
I think I will have to be a little more clear: Make sure AutoResize is set to no, then open the form in design mode, size the form WINDOW, and save the form.

If this doesn't work use VBA to set the form InsideHeight property (you can't do this from the property sheet, it isn't available there). Ex. from the form OnOpen event procedure:

me.insideheight = 1440 * 4
 
@missinglinq: This is a kb database used by myself. The form is too long and the data that I want out of view is only used occaisionally. The important information will stay in view but that is all that's needed in view. It may be frowned upon by developers but is what I'm after regardless.

@Peter D: The event procedure worked thanks. can you tell me how the numbers translate at all?
 
One other thing. The form when opened, opens at the top of the screen regardless of the property "Auto Center" being set to "Yes". It's as if Access is still positioning this as if the form was the previous height yet the InsideHeight is restricting this size. Any ideas how I can get this to be centered?
 
It depends on how you're setting it?

I'm setting it using the "me.insideheight..." method. I imagine this is at the top of the screen because the "Detail" section of the form still has a height of 26.362cm which I can't change and so regardless of the me.insideheight setting this is still taking precedence causing it to position at the top!? If so how can I change this?

@Peter D: I have a feeling I'm asking a stupid question but what's the 1440 part? :o Upon testing it still affects the height but doesn't appear to represent mm!!
 
The InsideHeight setting is in twips. There are 1440 twips per inch.
 
Ok thanks. That's the first I've heard of twips!!

Any idea on the positioning issue?
 
Where is it positioned, and where do you want it positioned? Can you upload an image of your screen?
 
It's positioned at the top of the screen but want this centered vertially. Auto Center is already set to "Yes" but as mentioned the height of the detail section is set to 25.894cm which is the actual height of the form when all content is in view but is different to what I've set with the Me.InsideHeight...command.
 

Attachments

  • _2011-10-11_16-11-05.jpg
    _2011-10-11_16-11-05.jpg
    98.2 KB · Views: 107
I'm setting it using the "me.insideheight..." method. I imagine this is at the top of the screen because the "Detail" section of the form still has a height of 26.362cm which I can't change and so regardless of the me.insideheight setting this is still taking precedence causing it to position at the top!? If so how can I change this?
You can use DoCmd.MoveSize to set the form to a relative position to your application window.
 

Users who are viewing this thread

Back
Top Bottom