FoxStudent
Technical User
I am trying to use this function:
Function BuildResutlsTable(sSQL As String, sTableName As String, lRecords Affected 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.Execute dbFailOnError ***
lRecordsAffected = qdfAction.RecordsAffected
qdfAction.Close
BuildResultsTable = True
End Function
However, when I try to run it at the line marked *** I keep getting a message to say there are two few paramaters, however, I have looked at help and seen an example with the same line of code. Can anyone help me?
Thank u
Grainne
Function BuildResutlsTable(sSQL As String, sTableName As String, lRecords Affected 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.Execute dbFailOnError ***
lRecordsAffected = qdfAction.RecordsAffected
qdfAction.Close
BuildResultsTable = True
End Function
However, when I try to run it at the line marked *** I keep getting a message to say there are two few paramaters, however, I have looked at help and seen an example with the same line of code. Can anyone help me?
Thank u
Grainne