Need some help! I'm getting this error:
Run-time error '3065': Cannot execute a select query.
Here is the code:
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("cmTable", dbOpenDynaset)
Dim strSQL As String
Dim strQuoteID As Long
strQuoteID = Text2
If Nz(Rep.Column(0), 0) = 0 Then
MsgBox "You must Select A Rep"
Exit Sub
Else
End If
strSQL = "SELECT * From cmTable " & _
"WHERE (((cmTable.QuoteID) = 724));"
CurrentDb.Execute strSQL, dbFailOnError
DoCmd.Close acForm, "CopyQuote_Header", acSaveYes
I know it is an issue of data but not sure how to solve it.
Any help would be greatly appreciated! Thanks
Run-time error '3065': Cannot execute a select query.
Here is the code:
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("cmTable", dbOpenDynaset)
Dim strSQL As String
Dim strQuoteID As Long
strQuoteID = Text2
If Nz(Rep.Column(0), 0) = 0 Then
MsgBox "You must Select A Rep"
Exit Sub
Else
End If
strSQL = "SELECT * From cmTable " & _
"WHERE (((cmTable.QuoteID) = 724));"
CurrentDb.Execute strSQL, dbFailOnError
DoCmd.Close acForm, "CopyQuote_Header", acSaveYes
I know it is an issue of data but not sure how to solve it.
Any help would be greatly appreciated! Thanks