Options

focus in a header-lines form

coolmckcoolmck Member Posts: 2
edited 2002-10-14 in Navision Attain
hi all

we are working around a form based in purchase invoices form, this means a header & lines form. we are trying to capture the focus or the cursor position, because depending where the cursor is (header or lines) we have to perform different functions.

the scenario is the following: if the cursor is in a line of the subform, we have to perform one function called 'A', but if the cursor is in the tab (header), we have to perform another function, called 'B'.

the selection between 'A' or 'B' depends on the OnPush trigger placed in the main form.

we tryed to control in which form is the cursor using the OBJECTID function, but it didn't work as expected. so the question is how can we control the cursor position between forms in a header & lines form?

zanx.

Comments

  • Options
    ArtursArturs Member Posts: 30
    You can try to use variable, that changes value depending in which control is active.
    You can change the value using OnAcivate and/or OnDeactivate triggers in all controls.
    Regards,
    Arturs Gedvillo
    CTO
  • Options
    bobbySrivastavabobbySrivastava Member Posts: 30
    whenever you goto Header to lines or vice versa the form activate trigger fires .

    step1. Make a function in Header form.
    Step2. Call this function to update the variable on header form
    from activate trigger of subform.

    and then on command button you will have the variable saying which form
    is activated.
    Note: variable is updated at the activate triggers of both forms.

    Might this help u.
Sign In or Register to comment.