Results 1 to 6 of 6
  1. #1
    Tuckejam is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Jan 2020
    Posts
    168

    Overlapping Footer

    I messed up setting somewhere and cant find out which one.

    as you can see in the image below my footer overlaps the detail section.

    obviously I need the detail section to grow or auto size to fit the number of records but I have been trying to fix it and have changes so many settings now I am lost

    Click image for larger version. 

Name:	Capture.PNG 
Views:	19 
Size:	12.9 KB 
ID:	43314


    Click image for larger version. 

Name:	Capture2.PNG 
Views:	18 
Size:	9.9 KB 
ID:	43315


    Thanks again, I am finally, really enjoying learning Access but that is only because of all the help I have received from everyone here.
    Thank you!!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    the overlap is due to the size of the form, or the size of the monitor.
    enlarge the form so it fills up the screen, and it wont overlap (scroll)

    tho small monitor resolutions may not show it, so find a happy medium.

  3. #3
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,557
    Hi
    The number of records displayed is dependant on the size of your Monitor.

    You can make the detail section bigger on the Form or you can try the following.

    You can make a reference to the Sum from the Footer Section and then Hide the Footer Control.

    Or you can enable the Vertical Scroll Bar
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  4. #4
    Tuckejam is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Jan 2020
    Posts
    168
    (I might be looking for more magic than Access has)

    is there now way to have the subform auto resize the detail section to match the number of records?

    Auto resize meaning to always place the form footer to start after the last record in the detail section

  5. #5
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,557
    Hi

    There is no way that I know of that would achieve what you want.

    A form's Height can be a maximum of 22 inches. It wont all be visible on the screen at one time, but you can use the Access window's scroll bar to get to the bottom of the form.

    If you make a form that does fit in the Access window but has more rows in datasheet or continuous view than can be seen at the same time, the form can have a vertical scroll bar, or, as you asked, hitting Enter to move to the next record will automatically scroll the form so the current record is visible.
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  6. #6
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,398
    is there now way to have the subform auto resize the detail section to match the number of records?
    you need to set the height to

    the height of the header+the height of the footer+(the height of the detail section x the number of records)

    suggest use the resize event or current event - all depends on how your form actually works


    seem to recall you may need a small adjustment because you also need to account for the subform border size as well

    so in the main form current event you might have something like

    mysubform.height=mysubform.form.section(1).height+ mysubform.form.section(2).height+(mysubform.form.s ection(0).height*mysubform.form.recordset.recordco unt)

    you will need additional code to trap errors - if the height +subform top is too great because of the number of records you will get an error. Or perhaps when the code is run, the subform has not been fully populated with records. As I said, depends how your form is intended to work.

    Personally, in design view you can simply adjust the subform control height so it displays full rows then you have the scrollbar if there are more rows. It is dangerous to assume 'there will never be more than X records' because at some point, there will be. Also from a user perspective, having a control keep changing size can be disconcerting.

    What I have done in the past where a client want to be able to resize is to put a bar just below the subform and use the mousedown/move/up events to resize the the subform - it gives them control.

    code would be something like this - hbar is a box control set with a height of 30 twips (0.05cm)

    Code:
    Dim startY As Single
    Dim mseDown As Boolean
    Const Margin = 30
    
    
    Private Sub hBar_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    
        mseDown = True
        startY = Y
        
    End Sub
    
    
    Private Sub hBar_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    
        On Error Resume Next 'in case form sizing parameters are breached
        
        If mseDown And hBar.Top + Y - startY > sform.Top And hBar.Top + hBar.Height + Y - startY + Margin < InsideHeight Then  'within sizing parameters
       
             'move the bar
            hBar.Top = hBar.Top + Y - startY
            
            'adjust subform height
            sform.Height = hBar.Top - sform.Top - Margin
            
        End If
        
    End Sub
    
    
    Private Sub hBar_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    
        mseDown = False
        
    End Sub

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Overlapping dates
    By soldat452002 in forum Queries
    Replies: 3
    Last Post: 03-18-2020, 05:13 PM
  2. Overlapping Fields
    By pharrison74 in forum Reports
    Replies: 20
    Last Post: 03-02-2016, 09:47 AM
  3. Force Report Footer to before Page Footer
    By Charles CL in forum Reports
    Replies: 15
    Last Post: 01-21-2016, 12:06 PM
  4. Replies: 2
    Last Post: 12-21-2013, 02:09 PM
  5. Replies: 2
    Last Post: 10-15-2013, 09:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums