Results 1 to 4 of 4
  1. #1
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544

    Question Too Few Parameters - UPDATE SQL

    I have the below code. I have looked over this time and time again. Not quite sure what is throwing the error message. A fresh set of eyes would help. Thank you.

    Code:
        Dim varUser As String
        Dim varDate
        Dim varEntityID
        
        varEntityID = Form_AA_frmBankGarn.txtPriEntityID.Value
        varUser = Form_FrmMain.RV.Value
        varDate = Now()
        mySQL = "UPDATE LevyTable SET [LastUpdateUser]= varuser WHERE [PriEntityID]='" & varEntityID & "'"
        CurrentDb.Execute mySQL, dbFailOnError
    Keep getting the error message:

    "Run-time error '3061':
    Too few parameters. Expected 1."

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    mySQL = "UPDATE LevyTable SET [LastUpdateUser]= varuser WHERE [PriEntityID]='" & varEntityID & "'"

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    varuser needs to be concatenated into the string, similar to how varEntityID was.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    Thank you.

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

Similar Threads

  1. Removing parameters
    By katrinanyc926 in forum Reports
    Replies: 1
    Last Post: 08-04-2010, 04:24 PM
  2. Replies: 3
    Last Post: 07-01-2010, 07:55 PM
  3. Why am I getting error: too few parameters?
    By cowboy in forum Programming
    Replies: 3
    Last Post: 03-24-2010, 10:13 AM
  4. Report parameters
    By saylindara in forum Reports
    Replies: 15
    Last Post: 08-02-2009, 03:49 PM
  5. Replies: 0
    Last Post: 02-15-2007, 03:07 PM

Tags for this Thread

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