FoxStudent
Technical User
Why is that the line marked *** in this piece of code keeps giving me the error two few paramaters. I have looked at help and the line seems to be alright. Has anyone any sugestions? If so please help me. Thank u!
Function BuildResultsTable(sSQL As String, sTableName As String, lRecordsAffected As Long)
Dim db As Database
Dim qdfAction As QueryDef
Set db = CurrentDb
On Error Resume Next
db.TableDefs.Delete sTableName
On Error GoTo 0
sSQL = Replace(sSQL, " FROM ", " INTO " & sTableName & " FROM "
Set qdfAction = db.CreateQueryDef("", sSQL)
qdfAction.Execute dbFailOnError
lRecordsAffected = qdfAction.RecordsAffected
qdfAction.Close
BuildResultsTable = True
End Function
Function BuildResultsTable(sSQL As String, sTableName As String, lRecordsAffected As Long)
Dim db As Database
Dim qdfAction As QueryDef
Set db = CurrentDb
On Error Resume Next
db.TableDefs.Delete sTableName
On Error GoTo 0
sSQL = Replace(sSQL, " FROM ", " INTO " & sTableName & " FROM "
Set qdfAction = db.CreateQueryDef("", sSQL)
qdfAction.Execute dbFailOnError
lRecordsAffected = qdfAction.RecordsAffected
qdfAction.Close
BuildResultsTable = True
End Function