Question: Must use an updateable query??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jmarcrum
    New Member
    • Oct 2007
    • 105

    Question: Must use an updateable query??

    Hey guys,

    I have a query that when i try and run it in code,

    DoCmd.SetWarnin gs False
    DoCmd.OpenQuery "qryOutageCMICh eck"
    DoCmd.SetWarnin gs True

    It gives me an error, "Must use an updateable query"

    Why would this be the case? Here's my query...

    [CODE=VB]UPDATE qryOutageCMISum INNER JOIN tblOutages ON qryOutageCMISum .CaseNumber = tblOutages.Case Number SET tblOutages.Find ings = "Outage did not meet minimum requirements for review", tblOutages.Prin ted = True, tblOutages.Stat us = 4
    WHERE (((tblOutages.c hkOutages)=True ) AND ((qryOutageCMIS um.SumOfCMI)>=2 5000));[/CODE]
    Here's the qryOutageCMISum ,

    [CODE=VB]SELECT tblOutages.Case Number, Count(tblOutage s.RefNumber) AS CountOfRefNumbe r, Sum(tblOutages. CMI) AS SumOfCMI
    FROM tblOutages
    GROUP BY tblOutages.Case Number
    HAVING (((Sum(tblOutag es.CMI))>=25000 ));[/CODE]

    Thanks!!!!!

    -Joseph
  • RuralGuy
    Recognized Expert Contributor
    • Oct 2006
    • 375

    #2
    See if this link helps a bit.

    Comment

    • missinglinq
      Recognized Expert Specialist
      • Nov 2006
      • 3533

      #3
      Originally posted by jmarcrum
      It gives me an error, "Must use an updateable query"
      Why would this be the case?
      Allan's given you a link to Allen's excellent explanation of what make's a query non-updateable, and the answer to your question of "Why would this be the case?" is that it has to be updateable because you're trying to do an update!

      Linq ;0>

      Comment

      Working...