Results 1 to 7 of 7
  1. #1
    Lounger
    Join Date
    Nov 2006
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    run time error (2003)

    I am getting run time error at execution: "Operation must use an updateable query" - Select portion works fine and returns numeric value
    UPDATE Totals SET himpcount = (SELECT Count([480VBrEvaluation].[fkEval480brID])
    FROM 480VBrEvaluation
    WHERE ((([480VBrEvaluation].[480brProb])="medium") AND (([480VBrEvaluation].[480rbrImp])="high")));
    Thank you Alex

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: run time error (2003)

    Your subquery makes the query as a whole non-updateable. Try the following:
    <code>
    UPDATE Totals SET himpcount = DCount("fkEval480brID]","480VBrEvaluation","[480brProb]='Medium' AND [480rbrImp]='high'")
    </code>
    Note the use of single quotes within the where-condition

  3. #3
    Lounger
    Join Date
    Nov 2006
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: run time error (2003)

    it's interesting, now, after accepting request for update, I am getting error message "Unknown" - thanks MS

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: run time error (2003)

    We'd need to have more info to investigate this. Could you post a stripped down copy of your database? See <post#=401925>post 401925</post#> for instructions.

  5. #5
    Lounger
    Join Date
    Nov 2006
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: run time error (2003)

    I found a syntax error ("fkEval480brID]", so there is no errors anymore, but it doesn't update Totals anyway
    I have extracted to a very small DB to show

    Thank you
    Alex
    Attached Files Attached Files

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: run time error (2003)

    Sorry about the typo.

    The query itself is OK now, but the problem is that there is no record in the totals table yet, so there is nothing to update.
    Solution: enter a dummy value in any of the fields of totals (not in the AutoNumber field, of course), then delete it, and close the table.
    You can now run the update query successfully.

  7. #7
    Lounger
    Join Date
    Nov 2006
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: run time error (2003)

    Hans- Thank you so much! Typo is not an issue it was my fault, MS gives misleading messages -that is obviouse.
    The bottom line - it works great!!!

Posting Permissions

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