Select the tab to display when a form opens

tompynationtompynation Member Posts: 398
If we cant hide tabs, is it then possible to declare which tab should be selected when the forms opens?

Answers

  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    No, but you can select a control which is on the tab you want to display.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • tompynationtompynation Member Posts: 398
    this doesnt seem to be working for me...

    I have 2 tabpages on my Main Form, each tabpage contains a subform...

    Inside the subform on the first tab, the user has the opportunity to copy the rec. After the copy the same Main Form is opened again,

    But now the second tabpage is selected... while it should be the first one.

    I've added this to my OnOpenForm trigger of the main form:

    CurrForm.POProductFormuleSub.ACTIVATE;

    POProductFormuleSub is the subform on the firsttabpage
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • tompynationtompynation Member Posts: 398
    no that doesnt solve it either
  • garakgarak Member Posts: 3,263
    edited 2008-08-12
    I doesn't understand you.

    With
    CurrForm.YourSubform.ACTIVATE;
    
    you set the focus on your subform (but check also property SaveControlInfo). Whatever in which Tab the control is designd.
    Do you make it right, it works too!
  • tompynationtompynation Member Posts: 398
    well, i have added that code to the Main Form his OnOpenForm trigger,
    but it doesnt work when i call the form by using

    FORM.RUNMODAL
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    It has nothing to do with RUNMODAL. The problem is that the saved control view is applied after your code in OnOpenForm has been executed.

    Set property SaveControlInfo to No.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • tompynationtompynation Member Posts: 398
    allright, Einsteint you are the man =D>

    Finally working now \:D/
Sign In or Register to comment.