Tab Control Issue

Jube0512
Jube0512 Member Posts: 21
Hi all,

I have a problem in my tab control which have 4 tabs,
When i open the form, it always focus on the 4th tab.

How can i focus on the 1st tab when open the form?

Help \:D/

Comments

  • rajpatelbca
    rajpatelbca Member Posts: 178
    hi
    i think you have set Activecontrolonopen property of form. remove it.
    then you will find that first tab automatically focus when u run a form.

    hope it helps.

    Regards,
    Experience Makes Man Perfect....
    Rajesh Patel
  • Jube0512
    Jube0512 Member Posts: 21
    Thanks for your reply.

    But, Activecontrolonopen is in default value: <0>

    any idea or work around?
  • rajpatelbca
    rajpatelbca Member Posts: 178
    i think that tab control will open previously opened tab by default. if u want to set it to first tab then copy the id of control placed on first tab. then paste it to activecontrolonopen of form. think this might be work.
    Experience Makes Man Perfect....
    Rajesh Patel
  • Jube0512
    Jube0512 Member Posts: 21
    Still not work ><

    Actually in each tab, there is suform.

    each subform has 'SubFormLink' linked.

    I found that if i erase the subformlink, the tab control works fine.

    The tab is pointing to the first one when open form.

    What can i do if i need the subformlink and also the tab control works great?
  • rajpatelbca
    rajpatelbca Member Posts: 178
    if possible move that subform to first tab.
    Experience Makes Man Perfect....
    Rajesh Patel
  • fverkel
    fverkel Member Posts: 66
    I have had the same problem, but haven't found a solution.
    It happens only when the subform does not have any records.
    As if the OnNewRecord trigger stops something ... ?
    (NAV 3.70)

    Navision recommends not using subforms on a tab control.
    Keep It Simple and Stupid (KISS), but never oversimplify.
  • kriki
    kriki Member, Moderator Posts: 9,121
    On the forms of the subforms, you need to put form-property DelayedInsert=Yes to avoid the problem.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • fverkel
    fverkel Member Posts: 66
    Thanks, that works!
    Keep It Simple and Stupid (KISS), but never oversimplify.
  • Jube0512
    Jube0512 Member Posts: 21
    Hi all,

    I have fixed it by add a new function in subform which setrange the record. Parent form will call this function at OnOpen. Then i remove the subform link. :P

    It works ^^
  • David_Singleton
    David_Singleton Member Posts: 5,479
    Jube0512 wrote:
    Hi all,

    I have fixed it by add a new function in subform which setrange the record. Parent form will call this function at OnOpen. Then i remove the subform link. :P

    It works ^^

    But why do such a complex solution when Kriki offers an ideal simple solution that works and is the recommended method?
    David Singleton
  • kriki
    kriki Member, Moderator Posts: 9,121
    Jube0512 wrote:
    Hi all,

    I have fixed it by add a new function in subform which setrange the record. Parent form will call this function at OnOpen. Then i remove the subform link. :P

    It works ^^

    But why do such a complex solution when Kriki offers an ideal simple solution that works and is the recommended method?
    Why make it easy when you can make it complex? :mrgreen:
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!