Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2013
    Posts
    18

    Unanswered: Whats Wrong With My Code?

    strSQL = "UPDATE T_EMPLOYEE " & _
    "SET MI = " & Me.MI & ";"

    Debug.Print strSQL
    db.Execute strSQL

    Error message says Too few Parameters expected 1

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    At a guess, either something is spelled wrong or the data type is text. What does the debug line produce?
    Paul

  3. #3
    Join Date
    Jan 2013
    Posts
    18
    Update t_employee set mi = a;

  4. #4
    Join Date
    Jan 2013
    Posts
    18
    the data type for MI is text

  5. #5
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Try

    strSQL = "UPDATE T_EMPLOYEE " & _
    "SET MI = '" & Me.MI & "';"

    note the single quote delimiters.
    Paul

Posting Permissions

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