Results 1 to 8 of 8
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query is too complex (2003)

    I am using a form to make selections in a query. (See attached). I have 7 fields that I want populated or not. I am using the following for the seven fields:
    [forms]![Overall4]![txtBrandedVis] or [forms]![Overall4]![txtBrandedVis] is Null. When I go to fun the report it is giving me an error " Query is too complex". Is there any way to do this?
    Attached Files Attached Files

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

    Re: Query is too complex (2003)

    I think we'd need to see the database, or a stripped down copy of it.

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query is too complex (2003)

    It is a hugh database so I don't think I can get it down small enough. I can see by the query that it is too complex. I guess there is a limit on how many fields you can filter on or not.

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

    Re: Query is too complex (2003)

    See <post#=401925>post 401925</post#> for instructions for reducing the size of a database for posting.

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query is too complex (2003)

    I took out the form and just used
    [Enter Health Y,N or Null] or [Enter Health Y,N or Null] is Null
    That doesn't give me query is too complex. Now I have another problem. When I use these fields in a report, I want the fields that are null to show blank and just give me the N or Y in the fields where they are populated with N or Y. I have attached a screen print of the report. At the top are the fields I am referring to. I selected "Y" for Health and "N" for UCCI. The other fields should be blank. Is there a way to do this?
    Attached Files Attached Files

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

    Re: Query is too complex (2003)

    If they are Yes/No fields - such fields are either True or False, never blank.

    What happens if you use text boxes with a control source such as

    =[Enter Health Y,N or Null]

  7. #7
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Query is too complex (2003)

    Linda,

    The error message you are receiving can be caused by filtering or processing different data types such as text vs numerical in the same field in a query. Any chance this is happening? Just curious, why are you using the same field twice to compare to null in your example?

    Also, by letting the users select Y, N or leaving it blank, you are just making it harder on yourself to determine what has been selected. Why even allow the user to leave the box blank - it is just one more item to think about or that could go wrong. It would be simpler to set up the form with checkboxes for selections. You can default them to 0 (not selected) when opening the form. You then look for the checkbox value of -1 if it is selected. If all of the values are 0, then nothing was selected and you can prevent the report from running. Personally, I like the checkboxes as you can input the selections quickly with the mouse. HTH
    Regards,

    Gary
    (It's been a while!)

  8. #8
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query is too complex (2003)

    That works - thanks for your help....

Posting Permissions

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