系统提示错误,代码如下:
Private Sub Command3_Click()
On Error GoTo err_command3_click
Dim str As String
Dim rs As New ADODB.Recordset
ID = Trim(Me.用户编号)
If IsNull(ID) Then
DoCmd.Beep
MsgBox ("请输入用户编号!")
Else
str = "select * from 用户基本信息 where 用户编号='" & Me.用户编号 & "'"
Set rs = GetRS(str)
If rs.EOF Then
MsgBox ("没有此用户信息")
Me.用户编号 = ""
Me.用户编号.SetFocus
Exit Sub
Else
Me.用户名称 = rs.Fields("用户名称")
Me.用户地址 = rs.Fields("用户地址")
Me.联系电话 = rs.Fields("联系电话")
Me.移动电话 = rs.Fields("移动电话")
Me.所属统册号 = rs.Fields("所属统册号")
End If
End If
Set rs = Nothing
Set conn = Nothing
Exit Sub
exit_command3_click:
Exit Sub
err_command3_click:
MsgBox Err.Description
Resume exit_command3_click
End Sub