Andy Brown
asked on
Positioning a form at the base of the screen
I have an Access database containing a central form that is maximised/stretched to fit onto the users screen. This form also had/has a hidden footer on that containing some utility buttons. However, when the footer is activated/visible the "page up/down" keys move the form up and down, rather than onto the next/previous record. I know why this occurs, but I do not beilve that you can shrink the forms down (at will) to take into account the form footer.
To get over this I have now created a new form (with no border) that will open (instead of the footer). However, I would like the form to open in the bottom left hand corner of the main form, which I cannot seem to figure out. Any ideas?
To get over this I have now created a new form (with no border) that will open (instead of the footer). However, I would like the form to open in the bottom left hand corner of the main form, which I cannot seem to figure out. Any ideas?
You can use the MoveSize command to position a form in a specific part of the screen. The form cannot be maximized. Here is the syntax:
DoCmd.MoveSize Right:=2000, down:=1000, _
Width:=14000, Height:=10000
Of course, this is not guaranteed to have the same effect on another monitor, with possibly different resolution and different dimensions.
DoCmd.MoveSize Right:=2000, down:=1000, _
Width:=14000, Height:=10000
Of course, this is not guaranteed to have the same effect on another monitor, with possibly different resolution and different dimensions.
If you are running Access 2007 or higher, this might be a situation in which the Tabbed Windows option is desirable.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thanks everyone:
Fyed: This doesn't work as once everything has been stretched (notes fields etc) and the Detail object has been stretched - it won't let you reduce the Detail height.
Helen: I'll have a play around with the MovieSize command, but I tried this a little earlier and it was unpredictable. This database is 2003, so the Tabbed Windows option isn't applicable.
Thanks again everyone - much appreciated.
Fyed: This doesn't work as once everything has been stretched (notes fields etc) and the Detail object has been stretched - it won't let you reduce the Detail height.
Helen: I'll have a play around with the MovieSize command, but I tried this a little earlier and it was unpredictable. This database is 2003, so the Tabbed Windows option isn't applicable.
Thanks again everyone - much appreciated.
ASKER
Thanks ClarkScott - I'll give it a try.
ASKER
Thank you, that did the trick nicely.
I really appreciate everyones help on this.
I really appreciate everyones help on this.
How are you "stretching" everything?
can you use Docmd.Restore to return the form to it's normal size, then make the footer visible, then maximize it again?
You could wrap this in docmd.Echo False followed by docmd.Echo True to hide the screen refresh, but if you do this, you need to make sure that if an error occurs, you will hit the docmd.Echo True command or your screen will stop updating.
can you use Docmd.Restore to return the form to it's normal size, then make the footer visible, then maximize it again?
You could wrap this in docmd.Echo False followed by docmd.Echo True to hide the screen refresh, but if you do this, you need to make sure that if an error occurs, you will hit the docmd.Echo True command or your screen will stop updating.
You can use the Height property of the various sections to change the height of the Detail section when you make the footer visible.
Me.Section(acDetail).heigh
me.section(acFooter).visib