大意了,改一下。
Private Sub Combo1_GotFocus()
On Error GoTo onn
Dim ix, iy, iz As String
If Text2.Text <> "" Then
sjk = Text2.Text
Call conn
ix = "select*from 密码"
rs.Open ix, GG, 2, 3
Combo1.Clear
While rs.EOF = False
iy = rs.Fields("id").Value
Combo1.AddItem (iy)
rs.MoveNext
Wend
rs.Close
Else
Text2.SetFocus '焦点返回text2
End If
Exit Sub
onn:
rs.Close
MsgBox Err.Description
End Sub
版主还有什么好的建议?
Private Sub Combo1_GotFocus()
On Error GoTo onn
Dim ix, iy, iz As String
If Text2.Text <> "" Then
sjk = Text2.Text
Call conn
ix = "select*from 密码"
rs.Open ix, GG, 2, 3
Combo1.Clear
While rs.EOF = False
iy = rs.Fields("id").Value
Combo1.AddItem (iy)
rs.MoveNext
Wend
rs.Close
Else
Text2.SetFocus '焦点返回text2
End If
Exit Sub
onn:
rs.Close
MsgBox Err.Description
End Sub
版主还有什么好的建议?