[原] access97中textbox类似vb的maxlength功能的实现

Private Sub txt文字_KeyDown(KeyCode As Integer, Shift As Integer)
    
If (KeyCode = 13Or (KeyCode = 9Then
        
    
End If
End Sub

Private Sub txt文字_KeyPress(KeyAscii As Integer)
    
If (Len(txt文字.Text) > 3And (KeyAscii <> 8Then
        txt文字.SetFocus
        KeyAscii 
= 0
    
End If
End Sub
原文地址:https://www.cnblogs.com/temptation/p/913680.html