Results 1 to 4 of 4
  1. #1
    rickapplin is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    2

    HELP - ERROR 3061 - Too Few Parameters. Expected 1


    I am trying to update two fields in a table.

    Table Details:
    Name: tblUsersHistory
    Field 1 - usrName
    Field 2 - loginDate
    Field 3 - loginTime
    Field 4 - logoutDate
    Field 5 - logoutTime

    I insert the first three fields into this table at login:
    CurrentDb.Execute "INSERT INTO tblUsersHistory (usrName,loginDate,loginTime) VALUES ('" & whoRU & "','" & usrLoginDate & "','" & usrLoginTime & "')"

    Then at logout I want to update the last two fields. This is the statement I have but I keep getting the Error 3061 - Too Few Parameters. Expected 1:
    CurrentDb.Execute "UPDATE tblUsersHistory SET [logoutDate] = '" & Date & "', [logoutTime] = '" & Time & "' WHERE [userName] = '" & whoRU & "' AND [loginDate] = '" & usrLoginDate & "' AND [loginTime] = '" & usrLoginTime & "';"

    PLEASE HELP!!!

  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,518
    My guess would be a misspelled name, but this should help:

    http://www.baldyweb.com/ImmediateWindow.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    rickapplin is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    2
    LOL....wow. I fresh set of eyes certainly helps. I referenced usrName as userName. Thanks man.

  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,518
    No problem, and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Too Few Parameters, Error 3061
    By uncletreetrunk in forum Programming
    Replies: 7
    Last Post: 08-07-2012, 04:50 PM
  2. Runtime Error 3061 Expected 3
    By kumail123 in forum Programming
    Replies: 1
    Last Post: 03-28-2012, 09:44 AM
  3. Error 3061 Too Few parameters
    By gopherking in forum Programming
    Replies: 5
    Last Post: 10-06-2011, 11:50 AM
  4. 3061 Error. Too few parameters. Expected 1.
    By rghollenbeck in forum Queries
    Replies: 5
    Last Post: 09-28-2011, 12:12 PM
  5. Replies: 1
    Last Post: 05-21-2011, 01:33 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