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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameters too few !!!!!!!! 1

Status
Not open for further replies.

lars7

Technical User
Aug 16, 2005
817
GB
Hi there,

I'm getting a too few parameters (with or without the brackets) message with this code:

Dim strSQL1 As String

strSQL1 = "INSERT INTO copytblGameScores ( GPlayerId, GGameNo, GScore1, GScore2 )" & _
"SELECT [forms]![frmmainform]![text5] AS QId, tblTempFixtureSheet.[No], tblTempFixtureSheet.Score1, tblTempFixtureSheet.Score2 " & _
"FROM tblTempFixtureSheet INNER JOIN tblfixtures ON tblTempFixtureSheet.[No] = tblfixtures.GameNo "

CurrentDb.Execute strSQL1, dbFailOnError

can anyone see why.
 
lars7,

Try this:
Code:
strSQL1 = "INSERT INTO copytblGameScores ( GPlayerId, GGameNo, GScore1, GScore2 ) " & _
"SELECT '" & [forms]![frmmainform]![text5] & "' AS QId, tblTempFixtureSheet.[No], tblTempFixtureSheet.Score1, tblTempFixtureSheet.Score2 " & _
"FROM tblTempFixtureSheet INNER JOIN tblfixtures ON tblTempFixtureSheet.[No] = tblfixtures.GameNo "
HTH,

Ken S.
 


Thanks Eupher that worked great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top