Page 3 of 3 FirstFirst 123
Results 31 to 34 of 34
  1. #31
    kostakenny is offline Novice
    Windows 10 Office 365
    Join Date
    Nov 2022
    Posts
    12
    Thank you for helping me out with that. I have a new issue now. When I try to view the "COMMENTS" report in print view, I get a "Query is too complex" error. Anyone have any experience resolving this?



    Once again thank you all very much for your help!
    Attached Files Attached Files

  2. #32
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    All UPPER CASE is harder to read. I would not use that in naming scheme.

    How did you manage to build that report SQL statement?

    Issue starts in the UNION query. Already mentioned UNION is limited to 50 SELECT lines. You have 52.

    The alternative is VBA that writes records to a 'temp' table. Or migrate database to SQLServer (or the freebie version SQLServer Express). Apparently, it can handle waaaay more than 50 lines in UNION.

    Also, you have a semi-colon at the end of most lines. This punctuation should be on only the last line.

    Now the report query still has 'too complex error'.

    These tables are all set with WIN field as primary key. This is a one-to-one relationship. However, tables don't all have the same number of records. I see 579, 580, 581 records.

    The UNION query, however, ends up with 2451 records and WIN is not unique. Joining tables to the query fails. This is odd. I have used UNION query in other query that joins it to tables

    Will have to abandon UNION idea anyway because of the 50-line limit.

    I found a WIN of 2-8800-00. Should that be 880?
    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. #33
    kostakenny is offline Novice
    Windows 10 Office 365
    Join Date
    Nov 2022
    Posts
    12
    Would it be possible to just make another UNION query for the remaining lines?

  4. #34
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    I've tried to UNION two UNION queries and still hit the 50-line limit.

    But if the report JOIN SQL can't function anyway, issue is moot.
    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.

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Blank Space appearing on Subform
    By PaulaYoung in forum Forms
    Replies: 10
    Last Post: 04-27-2022, 06:18 PM
  2. Blank Space with Sub-Report on Main Report
    By StacyS in forum Reports
    Replies: 2
    Last Post: 10-23-2019, 09:02 PM
  3. Blank space between fields in report header
    By cebrower in forum Reports
    Replies: 3
    Last Post: 09-18-2018, 09:48 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