Results 1 to 7 of 7
  1. #1
    Bongobob21 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    29

    Subform in Tab

    Hi,

    I created a form on which are 3 tabs. In all those tabs are subforms with searchfields. When I click on one tab the Form "scrolls down" until the top of the subform. Therefore the tabs on the top are can"t be seen anymore. I would like to stop access from scrolling down, so that the tabs on the main form are always visble.


    Does anybody know how to force access to do this?

    thanks!

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Perhaps you can adjust the size of the controls, subform controls, etc. Adjust everything while in design view so it resides in the upper portion of your Main Form.

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    If it scrolls down to where you can't see the top of the Tabbed Control, the length certainly needs adjusting, as ItsMe suggested; one of the most user-unfriendly things you can do is to require a user to scroll in order to see all parts of a Form!

    The direct cause of this is probably that Focus is going to a Control near the bottom of the Subform in question. To prevent this, on the Form the Subform is based on, is to use code like this:

    Code:
    Private Sub Form_Current()
     FirstControlName.SetFocus
    End Sub

    where FirstControlName is just that, the name of the topmost, probably left side of the Form.

    Linq ;0)>

  4. #4
    Bongobob21 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    29
    I fortunatly this doesn"t work.
    Maybe it is a little bit complicated, but would it be possible to create a macro saying, if that tab is clicked scroll up?

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,627
    Resizing the subform container and tab controls should fix this. Forms should be sized for display on smallest monitor will be viewed on.

    So why didn't it fix?

    Maybe need to change TabOrder property of controls in the subforms.

    Bing: access vba scroll to top of form

    http://www.utteraccess.com/forum/Scr...-t1762931.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    Bongobob21 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    29
    The Focus is going to the box an the far top of the subform. Therefore it just scrolls down tha the top of the subform is just right below the header of the mainform.

  7. #7
    Bongobob21 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    29
    I created a textbox on top of the page which gets the focus when the Tab Control is updated (as explained by you guys). This works perfectly with the OnUpdate event of the Tab control, so if I change the tabs it doesn't scroll down that far anymore (just a very little bit, which is fine).

    But when I click the same tab two times in a row (so the tab control is not updated), the old problem is created of scrolling down. To solve this I inserted the same code in the OnClick event of the tab Control, but the OnClick doesn't help at all...

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

Similar Threads

  1. Replies: 7
    Last Post: 04-15-2014, 01:15 PM
  2. Replies: 1
    Last Post: 04-24-2013, 12:12 PM
  3. Replies: 4
    Last Post: 10-08-2012, 05:33 PM
  4. Replies: 6
    Last Post: 05-05-2012, 08:43 AM
  5. Replies: 4
    Last Post: 03-30-2012, 01:47 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