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

Error 3061 too few parameters strSQL statement 1

Status
Not open for further replies.

vba317

Programmer
Mar 5, 2009
708
US
Hello,
I have tried to add an and statement to an existing query that works and I keep on getting this error. I have tried different approaches and nothing seems to work. Everthing looks apaced correctly. Any help is appreciated.
Tom
My debug statement reads like
INSERT INTO PROC_RptSrc_ExecSumm SELECT dbo_RptSrc_ExecSumm.* FROM dbo_RptSrc_ExecSumm WHERE qrptid = 2935 AND runrpt = 1;

Code:
 strSQL = "INSERT INTO PROC_" & (strSrcTable) & " " & _
                                "SELECT dbo_" & (strSrcTable) & ".* " & _
                                "FROM dbo_" & (strSrcTable) & " " & _
                                "WHERE qrptid = " & (liQID) & " AND runrpt = 1" & ";"
                                Debug.Print strSQL
                    CurrentDb.Execute strSQL
 
When you run this:

SELECT dbo_RptSrc_ExecSumm.* FROM dbo_RptSrc_ExecSumm WHERE qrptid = 2935 AND runrpt = 1

do you get (1)the same number of Fields, (2) in the same order (3) with the same declaration as when you run this:

SELECT * FROM PROC_RptSrc_ExecSumm

Have fun.

---- Andy
 
Thank you Andy I am looking at the wrong table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top