Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2009
    Posts
    32

    Unanswered: UPDATE query Runtime error

    Hey everyone!

    Here is the code i wrote:


    Dim db As Database
    Dim sSQL As String
    Dim Lead As Integer
    Dim Callid As Integer

    Callid = Me.txtCallID
    Lead = Me.lstLeads.ItemData(0)

    Set db = CurrentDb()
    sSQL = "UPDATE tblCalltoLeadRelations SET tblCalltoLeadRelations.[Call ID] = Callid, tblCalltoLeadRelations.[Lead ID] = Lead;"

    db.Execute (sSQL)


    I get a runtime error 3061
    too few parameters. Expected 2

    What did i forget?

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    sSQL = "UPDATE tblCalltoLeadRelations SET tblCalltoLeadRelations.[Call ID] = " & Callid & ", tblCalltoLeadRelations.[Lead ID] = " & Lead & ";"
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Nov 2009
    Posts
    32
    CONCACTINATION! DUH! thanks buddy!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •