1. 程式人生 > >金蝶VB插件,單據保存時總是觸發GetFocus事件

金蝶VB插件,單據保存時總是觸發GetFocus事件

ict str nbsp 變量 private 插件 -1 taf val

在做金蝶插件時,在保存時,總是觸發GetFocus事件,讓人很傷心啊

Private Sub m_BillInterface_GotFocus(ByVal sKey As String, ByVal dctData As KFO.IDictionary, ByVal curDspValue As Variant, ByVal Col As Long, ByVal Row As Long, Cancel As Boolean)
    
    If (Row > 0 And r <> -110 And r <> Row And Not m_BillInterface.GetDataFldbyKey("
FBillNo_SRC", Row) Is Nothing) Then  //Row為當前行索引,r為自定義變量,當保存時,r=-110;
                                                                       //r<>Row,防止它重復亂觸發
If (m_BillInterface.GetFieldValue("FBillNo_SRC", Row) <> "") Then If
(sKey = "FInteger") Then r = Row                    //這一行很重要

金蝶VB插件,單據保存時總是觸發GetFocus事件