'第二个问题 Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii <> 8 And KeyAscii <> 45 And KeyAscii < 48 Or KeyAscii > 57 And KeyAscii < 65 Or KeyAscii > 90 And KeyAscii < 97 Or KeyAscii > 122 Then Beep KeyAscii = 0 End If End Sub
'第一个问题: dim conn as new adodb.connection dim rs as new adodb.recordset
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii <> 8 And KeyAscii <> 45 And KeyAscii < 48 Or KeyAscii > 57 And KeyAscii < 65 Or KeyAscii > 90 And KeyAscii < 97 Or KeyAscii > 122 Then
Beep
KeyAscii = 0
End If
End Sub
dim conn as new adodb.connection
dim rs as new adodb.recordset