高分请问下,Set rs = com.Execute() 第一行=附近有语法错误,大神们帮忙看看?
stSQL = "select 姓名 from 员工名单 where 员工名单.工号=" & Me!IIDcom.CommandText = stSQL
Set rs = com.Execute()
If rs.EOF Then
MsgBox "没有该员工号!请在员工名单中添加该号码。", vbOKOnly + vbCritical, "错误!(工号不存在)"
Me!IID = Empty
Me!Iname = Empty
rs.Close
con.Close
Exit Sub
ElseIf IsNull(rs("姓名")) Then
Me!Iname = "尚未输入"
Else
Me!Iname = rs("姓名")
rs.Close
End If
If IsNull(Me!Imodel) Or Me!Imodel = "" Then
con.Close
Exit Sub