Results 1 to 7 of 7
  1. #1
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664

    What is Error Number 3061?

    In the db that I have attached the files runs with the error when it executes strSQL. It seems to have a problem with the statement.


    CurrentDb.Execute strSQL, dbFailOnError





    It generates an error :

    Error number 3061
    Too few parameters.Expected 1

    I have checked the syntax and I have found nothing. Of course, that does not mean it is correct.

    I am just unsure as to what is causing the error. Is there a way to make the error checking more explicit?

    Anyway, how do I fix this error?

    Respectfully,

    Lou Reed
    Attached Files Attached Files

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Something is wrong with the SQL, perhaps a misspelled object. You didn't say where in the db, but this is the standard debugging method:

    BaldyWeb-Immediate window

    If you don't see the problem, post the SQL here.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664

    This is not clear

    I tried what you said. I tried on the program that does not work and on the program that does work. The output was in the locals not the immediate window. I have attached both db programs and
    screen shots of each. I am very confused why I am getting the Error 3061 on my db. Any other suggestions welcome.

    Why is it in the locals not the immediate window? There seems to nothing shown here as to what is wrong.

    Any help appreciated. Thanks in advance.

    Respectfully,

    Lou Reed
    Attached Files Attached Files

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Like I said, something misspelled. The field name is "ysnMeeting_Invite_Sent", not "ysnMeeting_Invite_SentID".

    As to the window, I'm not sure. Your pictures don't show the Immediate window, which is where the SQL will be.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    That worked. I am just wondering how it would be seen when I put the expanded version of it in the immediate window of the MS Access debugger.

    I mean would this have become obvious?

    Any help appreciated. Thanks in advance.

    Respectfully,


    Lou Reed

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    I wouldn't say obvious necessarily, but it's generally always helpful to see the finished SQL. It isn't always turning out like you expect. In this case, I didn't even run it. I just checked the names in the code against the names in the table.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 02-26-2016, 12:34 PM
  2. Run-Time Error 3061
    By lefty2cox in forum Programming
    Replies: 7
    Last Post: 02-21-2016, 07:33 AM
  3. VBA Code Returning Error Run Time Error 3061
    By tgwacker in forum Access
    Replies: 2
    Last Post: 11-24-2013, 11:00 AM
  4. Error 3061 - Too Few parameters
    By DetrieZ in forum Programming
    Replies: 2
    Last Post: 07-09-2013, 12:52 PM
  5. Error 3061
    By Shanks in forum Queries
    Replies: 4
    Last Post: 09-16-2009, 07:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums