Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

too many parameters!!!!

Status
Not open for further replies.

FoxStudent

Technical User
Feb 24, 2000
85
GB
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
 
you are executing a blank query you never assigned anything to it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top