Tab Controls and Anchors

mmchaley

Registered User.
Local time
Yesterday, 17:36
Joined
Dec 10, 2014
Messages
35
Hello all,

Background:
I have a couple of forms with tabs.

On these forms I am showing Form Headers and Footers and Detail

In the Form Header I have Project Identifier Info (Project Name, Contract Number and Quote Number)

In the Detail section I have the Tab controls where I have various project data.

Issue:
When the form opens on a screen that isn't tall enough and it activates the vertical scroll bar, it anchors to the top of the form on the first tab. This buries the tab labels above the Form Header/Detail break line.

Request:
Is there a property someplace I can set the initial vertical scroll anchor to be the top of the tab labels so when the form opens on a smaller screen, the tabs show?

Thanks all - I appreciate being able to transfer your knowledge into my noggin.

Mark
 
Is there a property someplace I can set the initial vertical scroll anchor to be the top of the tab labels so when the form opens on a smaller screen, the tabs show?
Short answer is no - the scrollbar goes the whole height of the form. Best advice is to reduce the width of your tabs by 0.5cm to allow for the scrollbar.
 
actually there is a possible solution but requires some work.


  • Create a new form which contains everything in the detail section of your form.
  • Remove all the detail from your existing form and add the new form as a subform - we'll call it sfDetail
  • Disable scrollbars on what is now the main form
  • Modify code as required to reference controls that are now in the subform (which should have the vertical scrollbar enabled)
  • in the main form resize event put the following code
    Code:
    sfDetail.move(0,0,insidewidth,detail.height)
This bit of code will ensure that the subform resizes to the area of the detail
 
Thanks - I will give that a shot.

Without trying it, I am thinking I will have primary key conflicts. ???
 
I might also try to alleviate the problem through training.
 
I am thinking I will have primary key conflicts. ???
Without knowing your recordsource I can't comment, but if all data changes are made in the detail section then unlikely. If you have the same recordsource for both main and sub forms you could perhaps a) make the main form recordset a snapshot and/or b) simplify the main form recordsource
 

Users who are viewing this thread

Back
Top Bottom