- Joined
- Jul 22, 2008
- Messages
- 4
- Reaction score
- 0
hello guys
I am getting this error Run time error '13': Type mismatch in this sql sentence: Set rst = db.OpenRecordset(sSQL)
The module I have starts like this:
Option Compare Database
Sub main()
Dim db As Database
Dim rst As Recordset
Dim sSQL As String
Dim sBID As String
Dim sOutputString(1 To 26) As String
Dim counter As Integer
Dim columnNames(2 To 26) As String
Set db = CurrentDb
sSQL = "DELETE * FROM myTable"
db.Execute sSQL
sSQL = "SELECT * FROM myQuery ORDER BY IdMyQuery"
Set rst = db.OpenRecordset(sSQL)
....
....
End Sub
Does anyone know anything to fix it?
Thanks
I am getting this error Run time error '13': Type mismatch in this sql sentence: Set rst = db.OpenRecordset(sSQL)
The module I have starts like this:
Option Compare Database
Sub main()
Dim db As Database
Dim rst As Recordset
Dim sSQL As String
Dim sBID As String
Dim sOutputString(1 To 26) As String
Dim counter As Integer
Dim columnNames(2 To 26) As String
Set db = CurrentDb
sSQL = "DELETE * FROM myTable"
db.Execute sSQL
sSQL = "SELECT * FROM myQuery ORDER BY IdMyQuery"
Set rst = db.OpenRecordset(sSQL)
....
....
End Sub
Does anyone know anything to fix it?
Thanks