Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2007
    Posts
    13

    Unanswered: query to complex! How I do this?

    OK I am designing a database thats due friday (already 2 weeks OD) and I thought I sorted this until I added some more criteria.

    ok this is what its ment to do/ what happens.

    The User enters criteria into the relevant boxes, leaving out the options they do not want to search on. (pic 1) they then press the run button which produces the report or shows the form for editing to results.

    http://i145.photobucket.com/albums/r...searchform.jpg

    this works fine with a max of 4 or so search options, however as soon as the user runs it a few times or if I add another criteria to be included, I get the message "query to complex" and then it looks like this.

    http://i145.photobucket.com/albums/r.../qbf_after.jpg

    and will not run anymore

    What is the best way to get the query to work with all cirteria available?

    I have been using
    Code:
    forms!form_name!Controlname or Forms!form_name!Controlname is null
    I need to pass code to the critera some how via VBA i assume, but not sure how this happens.

    PLEASE HELLLPPPPP!!!!! IM GOING MAAAAAAAAADDDDDDDDD!!!

  2. #2
    Join Date
    Sep 2006
    Posts
    265
    Create a module, create a function for the Client and parse your criteria into the the call along the lines of:

    Function InputDialogue_Criteria()

    With CodeContextObject

    if not isnull(.[Server Type]) then
    InputDialogueCriteria = "[Server Type] = '" & .[Server Type] & "'"
    end if

    End With
    End Function

    In the only statement you then use:

    Function ClientsDialogue_ClientsEntry()

    With CodeContextObject
    DoCmd.OpenForm "Clients", , , InputDialogue_Criteria
    End If
    End With

    End Function

    In the Criteria build you can test for entry into the each of the text boxes along the lines of:

  3. #3
    Join Date
    Feb 2007
    Posts
    13

Posting Permissions

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