Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2015
    Posts
    2

    Unanswered: Update Query Returns Blank Values

    Hi, this is my first post so please be kind

    I have a table which most fields are populated by importing data from and XLS file using a macro. There are some fields that aren't included in the XLS but exist in the table design.

    To populate those extra fields I have tried building an update query but whenever I switch to worksheet view it returns blank values. The values are populated either from another table (left join) or using expressions based on the data already in the table (from the XLS).

    I have built a select query using exactly the same tables, joins and expressions and that returns the values I'm expecting. I just cannot get those values into the empty fields of the main table.

    Are there any really obvious settings or properties that I've overlooked? I have a similar database which does almoste exactly the same thing without any problem.

    Many thanks in advance

  2. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    495
    Provided Answers: 24
    update queries do not return values.
    when you do a 'test' view, it shows the values affected (as they are) not as they will be.

  3. #3
    Join Date
    Oct 2015
    Posts
    2
    Quote Originally Posted by ranman256 View Post
    update queries do not return values.
    when you do a 'test' view, it shows the values affected (as they are) not as they will be.
    Thanks for replying to my thread, ranman. I appreciate that the title/subject line does not quite use the correct phrase.

    In the previous version of this database, changing to worksheet view showed the values that would be written into the table once the update query is executed.

    Now I understand that is not always the case I will have another crack at it.

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    have you actually 'run' the query, as opposed to preview what may be changed. when you run a query, assuming the "set warnings" IS ON then RUNing the query will tell you how many rows are affected (whether thats 0 or a number)
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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