Results 1 to 10 of 10
  1. #1
    Bob Blooms is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Location
    FL and New England
    Posts
    19

    Query too Complex

    I have two queries that are what I consider to be quite simple. When I run aAlda1 and alda2 everything works ok. When I try to bring the two together it appears that the query is too complex. Do not know where to start to investigate why it is too complex.



    The intent of the query is combine the number of positions and their costs by program, subprogrma nad account (Line Seq Description) over two fiscal years.



    Code:
    SELECT qAlda1.Name, qAlda1.FTE AS [FY 2013 FTE], qAlda1.Cost AS [FY2013 Cost], qAlda1.Source, qAlda2.[Line Seq Descrpition], qAlda2.Program, qAlda2.[Sub-Program]
    FROM (qAlda1 INNER JOIN qAlda2 ON (qAlda1.Account = qAlda2.RIFANS) AND (qAlda1.Name = qAlda2.Name)) INNER JOIN qAlda3 ON qAlda1.Name = qAlda3.Name;

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Want to provide db for analysis? Follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Bob Blooms is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Location
    FL and New England
    Posts
    19

    MyDB is Attached

    MyDB.zip

    Keep looking at it and I cannot see the forest because of the trees.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Which queries?

    Opening the Switchboard errors on Me![Option1].SetFocus. Suggest you use TabOrder property to designate control that gets focus when form opens.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Bob Blooms is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Location
    FL and New England
    Posts
    19
    June7,

    this is my first attempt at such a project. I know that I really messed up the Switchboard (a little knowledge is dangerous). Once I get this project held together with bubblegum and tape I will get rid of the Switchboard and replace it with my own command buttons, because I know I will need more that 8 buttons. The Switchboard was only intended at a way to control the two important user input tables.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    This is very complicated query structure. Why do you join qAlda3 in the query but don't pull any fields from it?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Bob Blooms is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Location
    FL and New England
    Posts
    19
    I pulled field Total Cost from qAlda3 to see if it this is what was causing the error. The query works without it but not with it. I have tried playing with the relationships, but solved nothing.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Still don't understand why qAlda3 is involved. The other 2 will join and run.

    All 3 queries have the same number of records, but qAlda3 has different names, for example Axelson, Douglas is not in qAlda3 but is in the other 2. I don't think that causes the failure but would the resulting recordset be accurate?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    Bob Blooms is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Location
    FL and New England
    Posts
    19
    June 7, I just tried to query FY 2013 Total Costs with that of FY 2014 and get a Too Complicated. You may be right about the different names. They should all be the same. Will go back to square one and check the congurence of the list. Will get back to you. Thanks for you efforts. Crossing over from Excel to Access is a bumpy road.

  10. #10
    Bob Blooms is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Location
    FL and New England
    Posts
    19
    I learned a tought lesson on this issue. Thinking modular is the best approach in Access Query; it appears that this is not the case. The original intent was to build a query with FY2013 personnel cost projections with included total cost and the number of positions. The same would be done for FY2014. Finally, for each employee, their program, subprogram and activity would be established. The three queries would then be brought together. It BLEW UP!!. I rebuilt it into one query and it works fine. I failed to remember that each query links back to the queries that preceded it. There is not an infinite number of calculations available in Access Query.

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

Similar Threads

  1. Very Complex Query Help
    By Epidural in forum Queries
    Replies: 1
    Last Post: 05-14-2012, 12:13 PM
  2. Complex Query
    By amotto11 in forum Queries
    Replies: 5
    Last Post: 09-02-2011, 07:43 AM
  3. Complex query to me anyway
    By AndycompanyZ in forum Queries
    Replies: 3
    Last Post: 06-28-2011, 03:08 PM
  4. Help with complex Query
    By CEV in forum Queries
    Replies: 1
    Last Post: 03-12-2011, 06:54 AM
  5. Help with complex query (for me at least)
    By GrindEspresso in forum Queries
    Replies: 5
    Last Post: 01-26-2011, 11:03 AM

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