Size form Footer?

thechazm

VBA, VB.net, C#, Java
Local time
Today, 11:35
Joined
Mar 7, 2011
Messages
515
Is there a way to size the form footer up to the lowest control in the form details section? I tried this manually but it never does.

Thanks,

TheChazm
 
You would need to resize the Detail section.
 
Although I appreciate the reply but that is not going to work due to the fact that the details section needs to be a specific size. Here is the code I am trying to use:

Code:
Function ResizeFooter() As Long
Dim w As Long, h As Long, lngTotalInches As Long, lngxTwips As Long, lngyTwips As Long
 
w = GetSystemMetrics32(0) ' width in points
h = GetSystemMetrics32(1) ' height in points
 
lngxTwips = (w / 72) * 1440
lngyTwips = (h / 72) * 1440
 
ResizeFooter = lngyTwips - Forms(Application.CurrentObjectName).Detail.Height
End Function

This code does resize the footer but I think I may have the formula a little wrong as the footer is to large.

So lets say you have a 1080 on your Y resolution. The total twips on that screen is 15360 (or something like that). When I subtract the twips from the total value that the details section is using (which is 6600) I get a number that I am trying to assign to the footer. That should be the left over space but for some odd reason its not.

Can anyone please shed some light on this?

Thanks
 
as GalaxiomAtHome said,
"You would need to resize the Detail section."
There is simply no other way! The bottom border of the Detail Section determines how close the top of the Footer Section will be to the bottom-most Controls in the Detail Section. Nothing you do to the Footer Section is going to change this!

How could the Detail Section 'have to be a certain size' if you want part of it to be 'covered' by the Footer? Makes no sense!

Linq ;0)>
 
I think there is a misunderstanding here. I have the footer set to the bottom most control in the details section. But depending on the screen resolution the footer will either appear way below the bottom of the lowest control (Meaning it stays the same size no matter what even if I use anchoring). And two the details section is a switchboard.

I am not trying to cover up the main form with the footer. Here is some pics of what I am talking about maybe that might help. If I am wrong then I will accept it but I feel we all just don't understand.

... I'll have to try to find a way to post the images because the forum only excepts 100kb size files. I'll post back later.
 
Ok I was actually able to get it to zip small enough. Disregard the color scheme in the design view picture as I was trying to reduce the size to help it to fit.

View attachment images.zip

:D
 
I just wanted to say thank you for your input. As it may I may be a little confused at how to accomplish what I am trying to do but I appreciate the time everyone has spent trying to help me.
 
GetSystemMetrics returns the screen dimensions. However your function does not account for the Taskbar, Titlebar and StatusBar.

The calculation would need to incorporate the height of these objects which I imagine are also available in GetSystemMetrics. Then you would have to work with the Access Form.WindowHeight property to get the actual form height and allow for the Access menus.
 
Thanks for the reply. After I finish my testing I will post back.
 

Users who are viewing this thread

Back
Top Bottom