Results 1 to 5 of 5
  1. #1
    sj13 is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    3

    This expression is typed incorrectly, or it is too complex to be evaluated.

    Dear all,

    I made a database including ERP systems and all of its sepcs. Now, for my colleagues to be able to consult this database quickly and efficiently, I created a form based on a query. The form includes 8 fields which has to be filled out by my colleagues. Fields are for example: software name, software type, ... This way, they are able to find the suitable ERP system taking into account desired specs.

    In my query, corresponding to the 8 fields in my form, I have 8 different criteria. The first one being: Like "*" & [Forms]![SearchF]![Software name] & "*"
    I have this tpe of criteria 8 times.

    Is this too complex, am I not seeiing something or what is going on?



    Would much appreciate your input.

    Thanks in advance,
    Stan

  2. #2
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,658
    It would be more helpful if you posted the full sql of the query.

  3. #3
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,004
    When you use the wildcard at the start of the expression, Access won't be able to use any indexes when searching on those fields.
    Multiply that out by 8 other searches and you will probably have an issue.

    A much better option on your search form is to use combo box controls to restrict users to only be able to search for values that exist.
    You can them remove the Like "*" and replace it with = , as you know the data will be there.

    If you make the criteria

    Code:
    = [Forms]![SearchF]![Software name] Or [Forms]![SearchF]![Software name] is Null
    Then it will handle any combo's that aren't selected.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,840
    Not disagreeing with any of the foregoing, but the message is often the result of incorrect syntax, such as a missing parenthesis, comma, etc. that inadvertently creates a convoluted expression. The entire sql is definitely required in order to evaluate.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    sj13 is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    3
    Thank you all for responding so quickly!
    Thanks to your feedback I was able to resolve my issue.

    However, I am stuck with another problem atm.
    I have 2 forms: 1 for vendor and 1 for software.
    Each form has several fields to fill out by my colleagues. But at the top I want to make a dropbox where they can choose existing software/vendors so they can modify or review it. When selecting for example: Vendor ABC in this dropbox, all the filled out fields in the forms appear for Vendor ABC.

    I was able to do this for software. Whenever I select a software system in the dropbox on my form, all the fields below are filled out accordingly. However, for vendor I am stuck. I have the dropbox with the different vendors but I am not able to select a vendor. I can scroll and highlight vendors in the dropbox but I cannot select one.

    Thanks in advance!
    Stan

    EDIT: I now realise that when, in my Vendor form, I navigate through the different records, I am looking in another table "Experience". Why is my form looking in the wrong table?
    EDIT2: I also noticed by comparing the form that is working with the one that is not working that in my Property sheet - Event - After Update:
    - the working form says "[Embedded Macro]
    - the incorret form says nothing ...

    EDIT3: I noticed that I am missing an option when creating the combo box. The third option on the picture is not present when I create a dropbox in my Vendor form. The option is present when I create a dropbox in my other forms..
    EDIT4: I figured it out, my data source was missing! This topic can be closed!
    Attached Thumbnails Attached Thumbnails Knipsel.PNG  

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

Similar Threads

  1. Replies: 9
    Last Post: 12-14-2017, 04:59 AM
  2. Replies: 12
    Last Post: 07-21-2017, 10:04 AM
  3. Replies: 3
    Last Post: 02-10-2017, 09:51 AM
  4. Replies: 3
    Last Post: 12-21-2015, 09:53 AM
  5. Replies: 1
    Last Post: 05-24-2012, 12:34 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