[AccessD] error 3061 too few parameters 2003

Kath Pelletti kp at sdsonline.net
Tue Dec 5 19:32:49 CST 2006


I've done the same now - thanks. There were quite a few underlying queries which worked in their own right but somehow when I rewrote the 'top' level query from scratch it worked. I can't say that that was it though because I also did a bit of playing with the form criteria - adding Eval(".....") in front of the form criteria syntax.

Thanks for the suggestion - don't think I would have tried it w/out the suggestion - seems too easy!

Kath
  ----- Original Message ----- 
  From: Max Home 
  To: 'Access Developers discussion and problem solving' 
  Sent: Tuesday, December 05, 2006 6:51 PM
  Subject: Re: [AccessD] error 3061 too few parameters 2003


  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

  -- 
  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