求助,各位技术大大,帮我看看,为什么总报标准表达中类型不匹配啊,应该怎么改呢
求助,各位技术大大,帮我看看,为什么总报标准表达中类型不匹配啊,应该怎么改呢private Sub cmd2_dellinkman_Click()
Dim sql_del As String, rs_del As New ADODB.Recordset
sql_del = "select * from tbl_kman where com_id='" & Trim(cmpy_id) & "' and kman_id ='" & Str(kman_id.Text) & "' "
rs_del.Open sql_del, conn, adOpenKeyset, adLockOptimistic
If rs_del.BOF = True And rs_del.EOF = True Then
MsgBox "请选定需要删除的联系人", vbOKOnly
MSFlexGrid1.SetFocus
Else
If MsgBox("是否删除该联系人", vbYesNo, "提示") = vbYes Then
rs_del.Delete
rs_del.Close
End If
'MSFlexGrid1.BackColor = &H80000005
msflexgrid1_display '----------------|刷新数据表
Check2_kman.Value = 0 '----------|
Text2_name.Text = "" '-----------|
Text2_title.Text = "" '----------|
Text2_phone.Text = "" '----------|置空输入框
Text2_mobile.Text = "" '---------|
Text2_email.Text = "" '----------|
Text2_other.Text = "" '----------|
Text2_name.SetFocus
End If
com2_save.Visible = False
com2_cancel.Visible = False
cmd2_addlinkman.Visible = True
cmd2_dellinkman.Visible = False
End Sub
--------------------编程问答-------------------- del=" select * from 表名 where 字符型字段='"& 字符型变量 &"' and 数值型字段="& 数值型变量 &""
--------------------编程问答-------------------- 谢谢您的及时解答,问题已解决
补充:VB , 数据库(包含打印,安装,报表)