Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7992765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:39:47+00:00 2026-06-04T13:39:47+00:00

I am trying to update several columns in a table called tbl_Responses but it

  • 0

I am trying to update several columns in a table called “tbl_Responses” but it gives an error after running which I have been trying to find!

varX= DLookup("[ID]", tableName, "[supplierNum] = " & supplierNum)
updateFieldsTbl1="column1,column2,column3,column4"
updateValuesTbl1 ="name,lastname, bla bla"
'There is nothing wrong with those 3 variables above.


sqlUp = "UPDATE " & tableName & "(" & updateFieldsTbl1 & ")" & " SET " & "(" & _ updateValuesTbl1 & ") WHERE ID = " & varX
DoCmd.RunSQL sqlUp

It gives an error in UPDATE statement line.
Can you please tell what I am doing wrong?
Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T13:39:49+00:00Added an answer on June 4, 2026 at 1:39 pm

    Your string parses to:

    UPDATE tableName (column1,column2,column3,column4) SET (name,lastname, bla bla) ...
    

    Which is similar to the INSERT format which is not valid for an UPDATE, the correct format is:

    UPDATE tableName 
    SET column1 = 'name',
        column2 = 'lastname',
        columnN =  valueN
    WHERE ID = X
    

    build the string thusly and it should work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to update several rows in a table which match some criteria
Im trying to update the contents of an element after running some php code.
I am trying to update a column in my table which was last inserted.
I have a table with several columns that allow NULLs. How would I go
I'm trying to update two fields of several rows at once but I can't
I'm trying to update the text of a div which has several input buttons.
i am trying to update record with nHibernate. I tried several solutions, but none
I trying to update a model on a callback but the validation is causing
I am trying to update a field in a table with data from another
So I have a table of data that is 10,000 lines long. Several of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.