Dynamic Resizing of Form Footer (1 Viewer)

whdyck

Registered User.
Local time
Today, 12:28
Joined
Aug 8, 2011
Messages
169
I'm using Access 2003.

I have a FormView form which contains a Datasheet subform in the Detail section plus a Form Footer that contains tabs displaying additional info about the record selected in the Detail section's Datasheet. (See attached.)

I'd like to be able to make the footer resizable so that the user can drag its border to make it taller or shorter OR can click something to make the footer a lot taller momentarily to see more info on the record selected in the Details section.

Anyone done anything like that?

Thanks for any help you can give.

Wayne

(Cross-posted to utteraccess.com)
 

Attachments

  • UnitBookings.jpg
    UnitBookings.jpg
    101.3 KB · Views: 172

sneuberg

AWF VIP
Local time
Today, 10:28
Joined
Oct 17, 2014
Messages
3,506
I was hoping to tell you that you could do this with anchoring but I can get seen to get that work with a tab control the way you want. Maybe you could google "ms access control anchoring" and find out more about this and get it working.

If you can't find another way you could just resize the control brute force. Force example if your tab control were named FooterTabCtl then command button code like the following would increase it's size 10% each time the button was clicked.

Code:
Private Sub ZoomIn_Click()
Me.FooterTabCtl.Height = Me.FooterTabCtl.Height * 1.1
End Sub

You might have to resize the form footer too which you could do like

Code:
Private Sub ZoomIn_Click()
Me.FooterTabCtl.Height = Me.FooterTabCtl.Height * 1.1
Me.FormFooter.Height = Me.FormFooter.Height * 1.1
End Sub

If you want to set a control's absolute height please note that the sizes are in twips, e.g,

Code:
Me.FooterTabCtl.Height = 1440

sets the tab control to a height of 1 inch
 

CJ_London

Super Moderator
Staff member
Local time
Today, 18:28
Joined
Feb 19, 2013
Messages
16,685
Note that although you can resize a form footer, it cannot be shorter than the bottommost control

The only way you could achieve what you want is to have all the controls in a subform in the footer and resize the subform at the same time as resizing the footer.

Alternatively consider just having a detail section and have a continuous subform on that for the continuous part of your form with your 'footer controls' below that. Then you resize the subform over the 'footer controls' when required. It will probably make your scrollbar look more 'natural' as it will only be the height of the subform, not the main form.
 

sneuberg

AWF VIP
Local time
Today, 10:28
Joined
Oct 17, 2014
Messages
3,506
The only way you could achieve what you want is to have all the controls in a subform in the footer and resize the subform at the same time as resizing the footer.

From the image the whdyck posted it appears the that all of the controls in the footer are inside a tab control. Would this need to be put inside a subform?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 18:28
Joined
Feb 19, 2013
Messages
16,685
possibly not - I've never tried it with a tab control. On the tab displayed is a datasheet subform, not sure what happens if you try to have a tab control shorter than the lowest control - will it resize or does the control disappear below the bottom of the tab control? If the latter the subform control would also need to be resized otherwise the vertical scroll bar would become difficult to manage.
 

static

Registered User.
Local time
Today, 18:28
Joined
Nov 2, 2015
Messages
823
Add a long thin control at the top of the footer to use as a drag bar.

e.g. using a frame
Code:
Private Sub Frame1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
    If Button <> 0 Then FormFooter.Height = FormFooter.Height - Y
End Sub
 

whdyck

Registered User.
Local time
Today, 12:28
Joined
Aug 8, 2011
Messages
169
Thanks for the many suggestions. This is obviously rather complex.

Add a long thin control at the top of the footer to use as a drag bar.

Static, can you give more details re how to use your sub.

Thanks.

Wayne
 

static

Registered User.
Local time
Today, 18:28
Joined
Nov 2, 2015
Messages
823
View attachment drag.accdb

Apparently anchoring doesn't work in footers, (see form 'withfoot' in the attached) so you're better off using sub forms as others have said.
 

sneuberg

AWF VIP
Local time
Today, 10:28
Joined
Oct 17, 2014
Messages
3,506
View attachment 65346

Apparently anchoring doesn't work in footers, (see form 'withfoot' in the attached) so you're better off using sub forms as others have said.

Looking on the bright side I think a "See More" button would be more easily understood by the users than a drag bar.
 

Users who are viewing this thread

Top Bottom