'KeyDown
Dim r As Row
If e.KeyCode = Keys.Enter Or e.KeyCode = 188 Then
r= e.Table.Current
If r Is Nothing Then Return
If r("摘要") ="," Or r.Isnull("摘要") Then
r("摘要") =Nothing
Dim zz As Integer= r.Index-1
Do While zz>=0
Dim s As Row= e.Table.Rows(zz)
Dim zy As String= s("摘要")
' If s.Isnull("摘要")=True Or s("摘要")="," Then
If zy.Length<=1 Then
zz-=1
Else
r("摘要")=zy 's("摘要")
'MessageBox.Show(r("摘要"))
Exit Do
End If
Loop
End If
End If
如上代码完成功能是,当在回车或者在摘要列里录入逗号时,找到此行上面行非空摘要列的内容,赋值到此行摘要列里。
现在回车是好用的,但是录入逗号(,)时不好使。如果加一行'MessageBox.Show(r("摘要")),则又好使了。怎么回事?谢谢
[此贴子已经被作者于2018/12/27 20:00:42编辑过]