tab order

SamsonSamson Member Posts: 42
Hi,

I need to change tab order of the controls on form dynamicly.

I use CurrForm."Field Name".ACTIVATE function.

but when i call this function in the "XXX - OnDeactivate()" trigger i
get an error:
Microsoft Business Solutions-Navision
There is insufficient memory (stack) to execute this function.


This can be due to the way that recursive function calls are used in
the program. Contact your system manager if you need assistance.


OK

But calling of this function in the other triggers don't cause an error.

Any assistance how I can resolve my problem may be helpful.

Thanks

Comments

  • Thomas_Hviid_ThornThomas_Hviid_Thorn Member Posts: 92
    Hej Samson,

    If you want to change the order of the tabs in a tabcontrol: That's not possible in run-time.

    If you want to change the property NextControl of e.g. a TextBox, you can do it on the TextBox' trigger OnAfterValidate(), using the CurrForm."FieldName".ACTIVATE.
    With Kind Regards
    Thoms Hviid Thorn
  • SamsonSamson Member Posts: 42
    Hi Thomas Hviid Thorn

    [-X
    I have tried, but it not helped me, because OnAfterValidate trigger not works anytime, it works only if taxtbox value is changed.

    any other thoughts? :-k

    Thanks and greeting from Armenia,
    Samson
  • Thomas_Hviid_ThornThomas_Hviid_Thorn Member Posts: 92
    Hej Samson,

    I have no ideas, but that you will have to study the behavior of your form. Your will need to put the statement in more than one trigger ...
    With Kind Regards
    Thoms Hviid Thorn
  • SamsonSamson Member Posts: 42
    Most appropriate trigger is OnDeactivate(), which works anytime, but in that trigger Navision gives me an error message I mentioned in first posting of this topic(see above).

    I can put my statement in more than one trigger, but only OnDeactivate is works even if user not changed textbox value
  • Thomas_Hviid_ThornThomas_Hviid_Thorn Member Posts: 92
    Hej Samson,

    Sorry - I'm out of ideas!!

    Have you tried to post you question on some of the other Nav-discussion groups - e.g. http://dynamicsusers.org/
    With Kind Regards
    Thoms Hviid Thorn
  • SamsonSamson Member Posts: 42
    Thomas,

    Okay, I'll.
    Thank you anyway.
  • BalelloBalello Member Posts: 61
    It's seldom a good solution to use form's OnActivate and OnDeactivate triggers. It's simply a workaround when there isn't a better solution. And I never used them (somebody does? I would like to know what was the environment that needs that).
    When you press F2 the sistem cause the OnValidate to run, even if the data isn't changed, so this is a good place where you can write the code.
    If you think not, please specify what event or data change must change the order of the controls on that tab.
    I don't envy anybody who caught up his aim. I travel gladly.
  • SamsonSamson Member Posts: 42
    Thank you, but OnValidate trigger not occurs anytime, I can't ask to my user please press F2, even if you not going to change this field.

    My field is option type field, it's rarely changed field, but user need to got focus in this field every time, when he go through controls on form.

    Thank you again,
    Samson
Sign In or Register to comment.