说from子句语法错误,是想删除查询得到的结果,大家帮忙看看
Private Sub cmdDelete_Click()
On Error GoTo errorhandler:
Dim cn1 As New ADODB.Connection
Dim sqlselect As String
Dim sqlcon As String
cn1.Open "Provider=Microsoft.Jet.oledb.4.0;Data Source=" & App.Path & "\HT.mdb"
sqlcon = getCondSQL()
sqlselect = "delete from 合同表 where" & sqlcon
cn1.Execute (sqlselect)
MsgBox "确认删除合同吗", vbOKCancel, "确认信息"
cn1.Close
errorhandler:
MsgBox Err.Number & vbCrLf & Err.Description
Exit Sub
End Sub
[解决办法]
sqlselect = "delete from 合同表 where " & sqlcon
加空格试试??