[AccessD] error 3061 too few parameters 2003

Max Home max at sherman.org.uk
Tue Dec 5 01:51:46 CST 2006


Hi Kath,
I was getting a similar error on a query.  I was going mad trying to figure
out what the problem was.  It was a simply query but code based on it kept
throwing up this error - same as yours below.  

Eventually (for no other reason than I had tried everything else) I deleted
the query and re-created it. Errors disappeared.  Same sql code when viewed
in Notepad etc.  I can only assume that for whatever reason, Access had a
compilation bug on this particular query.

Max


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kath Pelletti
Sent: Monday, December 04, 2006 11:06 PM
To: Access D Normal List
Subject: [AccessD] error 3061 too few parameters 2003

Anyone know why this code would give me error 3061 - 'too few parameters'
when I run it in Access 2003 (it runs fine in A2K).

(I have created the references and there is a ref to DAO)


Dim db As Database
Dim strsql As String
Dim rs As DAO.Recordset
Set db = CurrentDb()
On Error GoTo Err_Handler

strsql = "SELECT * FROM QryHistory_PortfolioMVandIncome"

Debug.Print strsql
Set rs = db.OpenRecordset(strsql)        'error here


______________________________________
Kath Pelletti
Software Design and Solutions Pty Ltd.
Ph: 9505-6714
Fax: 9505-6430
Email: KP at SDSOnline.net
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list