Results 1 to 2 of 2
  1. #1
    jenh526 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Posts
    2

    Invalid operation running query

    Hi all,

    I have 3 queries in which the second uses the first and the third uses the second. My original 3 queries work just fine. When I copy and paste them and then update them to reflect the new names, they work fine. When I create 3 new queries and copy and paste the SQL code from the originals into them (and update them for the new names), I get an Invalid Operation error when I run the third query (the other two work fine). I have compared the properties and everything looks the same, so I really don't understand what is going on - what am I getting when I copy and paste the queries vs. just copying the SQL?



    Thanks,
    Jennifer

  2. #2
    jenh526 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Posts
    2
    Well, I got it working but I still have no idea what is going on or why this fixed the problem:

    Query 3 original:

    SELECT DISTINCT CondCodeQuery.DPROG
    FROM CondCodeQuery LEFT JOIN T_UnusedListReqs ON CondCodeQuery.DPROG = T_UnusedListReqs.DPROG
    WHERE (((T_UnusedListReqs.DPROG) Is Null));

    Query 3 now:

    SELECT DISTINCT CondCodeQuery.DPROG, Query2.DPROG
    FROM CondCodeQuery LEFT JOIN Query2 ON CondCodeQuery.DPROG = Query2.DPROG
    WHERE (((CondCodeQuery.DPROG) Is Not Null) AND ((Query2.DPROG) Is Null));

    where Query2 replaces T_UnusedListReqs (same SQL code). Only difference is that I am specifying CondCodeQuery.DPROG Is Not Null in the new query (there are no records where it is null anyway). Why does this make it work?!! This is some kind of black magic...

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Operation must use an updateable query.
    By pericherlasuma in forum Access
    Replies: 1
    Last Post: 05-16-2011, 09:45 AM
  2. Operation must use an updateable query
    By skaswani in forum Queries
    Replies: 0
    Last Post: 12-23-2010, 11:59 PM
  3. Operation Must use an Updateable Query
    By Lady_Jane in forum Queries
    Replies: 2
    Last Post: 12-14-2010, 03:02 PM
  4. Replies: 8
    Last Post: 12-04-2010, 07:53 PM
  5. Invalid Operation
    By ScottG in forum Forms
    Replies: 0
    Last Post: 11-14-2006, 02:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums