Skip to Content
author's profile photo
Former Member

SDK Logistic

HI

I have replace the Choose From List when calling the Inventory on the Sales Order Form with a Formatted Search using the SendKey method, everytime I press the Tab Key it calls the formatted search. It work fine for the Sales Order ,but I have to do the same in every form that call the Choose From List(Inventory).

I used an <u><b>IF Statement</b></u> to accomplish this, specifing the FormType = 139 and the ItemUID = "38" ,

know I have to do it for every form that calls the Inventory , I would like to know wish is the best way to implement this, (By creating a table with all the values of the form that need to call the Formatted Search, using a Select CASE ,If & Else ) Any ideas????

Here is the code that I have:

If pVal.FormType = 139 And pVal.ItemUID = "38" And pVal.EventType = et_KEY_DOWN And pVal.CharPressed = "9" And pVal.BeforeAction = True Then

Set dsa_Matrix = applic.Forms.Item(pVal.FormUID).Items("38").Specific

dst_Value = dsa_Matrix.Columns.Item("1").Cells.Item(pVal.Row).Specific.Value

If dst_Value = "" Then

BubbleEvent = False

Call applic.SendKeys("+")

End If

End If

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 03, 2005 at 01:55 PM

    If it is a "simple" where the keydown event is only needed for your tab action - it is straight forward.

    Add the filter for the Key Down event only on the forms you are intersted in.

    Then you don't have to use the if or case statements.

    (Just check if it was the tab key on your matrix and run your logic).

    This will work great for you.

    ---

    If you have key down events (other) than the tab on the matrix object - then you will have to use the case statement to check if it's the correct form (case is more optimal solution than if statements)

    Add comment
    10|10000 characters needed characters exceeded