以下是引用片段:
相关代码如下: '将列表中指定的工资记录显示在工资列表中 If ddd.TextMatrix(ddd.Row, 0) = "" Then Exit Sub Dim i As Long Dim j As Long With frmGzglsub .Text2.Text = Trim(ddd.TextMatrix(ddd.Row, 0)) .Text3.Tag = Trim(ddd.TextMatrix(ddd.Row, 1)) .Text3.Text = Trim(ddd.TextMatrix(ddd.Row, 3)) j = 0 For i = 4 To 10 Step 2 If Trim(ddd.TextMatrix(ddd.Row, i)) <> "" Then .txt(j).Text = Trim(ddd.TextMatrix(ddd.Row, i)) .Text(j).Text = Trim(ddd.TextMatrix(ddd.Row, i + 1)) Else .Text(j).Enabled = False End If j = j + 1 Next For i = 0 To .Combo2.ListCount - 1 If .Combo2.List(i) = Mid(Me.lblDate.Caption, 1, 4) Then .Combo2.ListIndex = i Exit For End If Next For i = 0 To .Combo1.ListCount - 1 If .Combo1.List(i) = Mid(Me.lblDate.Caption, 5, 2) Then .Combo1.ListIndex = i Exit For End If Next For i = 13 To 15 .TxtAdd(i - 13).Text = Trim(Me.ddd.TextMatrix(ddd.Row, i)) Next For i = 16 To 18 .TxtDel(i - 16).Text = Trim(Me.ddd.TextMatrix(ddd.Row, i)) Next .Text17.Text = Trim(Me.ddd.TextMatrix(ddd.Row, 19)) .Text18.Tag = Trim(Me.ddd.TextMatrix(ddd.Row, ddd.Cols - 2)) .Text18.Text = Trim(Me.ddd.TextMatrix(ddd.Row, ddd.Cols - 1)) For i = 0 To .Combo1.ListCount - 1 If .Combo1.List(i) = Mid(Me.lblDate.Caption, 5, 2) Then .Combo1.ListIndex = i Exit For End If Next .Show 1 End With End Sub
|