Results 1 to 12 of 12
  1. #1
    skippy is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Mar 2016
    Posts
    6

    the expression '|' you entered is invalid

    Hi,

    new to Access and brandnew to this forum. I got an odd error and this is one of very few in my life I couldn't find any solution by asking Mr. Google. It seems that Access itself puts the invalid part into the sql, but I can't find the place where I can prevent from doing that.

    What I have:
    Access 2013 64 Bit on Win7
    What I do:


    simply filtering any column in the datasheet view. When I do just one selection, it works. If I select more I get an error. This seems to apply only to columns with more than three different values.
    What I get:
    an error form thrown by Access, saying the expression '|' you entered is invalid

    I can do the required filtering using the sql itself or the design view, but I do want to provide the filtering.

    Hope somebody can help here, any hint highly appreciated.
    TIA

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    what did you type in for the filter? Did you type in the '|'?

  3. #3
    skippy is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Mar 2016
    Posts
    6
    No, didn't type anything. Just used the dropdown fields of the columns and selected by checking the checkboxes:

    Click image for larger version. 

Name:	2016-03-14_1347.png 
Views:	12 
Size:	18.9 KB 
ID:	24069

  4. #4
    skippy is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Mar 2016
    Posts
    6
    And what I get is this:
    Click image for larger version. 

Name:	2016-03-14_1213_001.png 
Views:	12 
Size:	21.6 KB 
ID:	24070

    I have just created the database above completely fresh and with Field1 and Field2 I can select different values, but I cannot with Field3 as there are four different values (three for field1 and field2). If I change the last "A" Value for Field2 to something different, the same happens there.
    I can provide this sample DB (you can also do it in < 1 min) if required.

  5. #5
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    in your table design, is your field3 a calculated or multivalue field?

  6. #6
    skippy is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Mar 2016
    Posts
    6
    all just short text. for the example I just started access, table1 was created automatically and typed in some values.

  7. #7
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    it was just a thought - they can cause issues like this.

    Have you saved the table before trying to filter?

    If still a problem and you are just exploring, suggest start a new db and try again, you may have 'tweaked' something unknowingly

  8. #8
    skippy is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Mar 2016
    Posts
    6
    saved yes.
    I saw the problem initially when I imported an excel sheet, so I wanted to exclude any possible side effect, so I did exactly what you suggested, just created a new one and did nothing than these three fields with some value.
    Below the DB (very small) maybe someone can check if he has the same problem ?

    Database21.accdb

  9. #9
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    just tried it and works OK for me (I'm running 2010)

  10. #10
    skippy is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Mar 2016
    Posts
    6
    Got it :-)
    As it was obviously not the database as it was working for you, I checked some system properties. I found that the list separator was '|' instead of ';'. Changed it, tried again and worked !

    Great. Thanks for your help.

  11. #11
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    FWIW,
    Using Win XP/A2010 32bit.
    I downloaded your dB.
    Set the filter as you described - no error
    Added more rows - still not able to reproduce the error.


    Edit... late again browser didn't refresh......

  12. #12
    Michael3876 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2019
    Posts
    1
    After quite some testing I found out that the problem seems to be as follows: as soon as there are more then 3 different values in a number field (no matter which type) the error occurs. If you change back the 4th value to one of the three the filter is okay again. So this seems to be a major bug in MS Access!!! I'm using the newest version of Office 365, so that is Access 2016, I guess!

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

Similar Threads

  1. Replies: 6
    Last Post: 02-26-2016, 04:26 PM
  2. Make Table Query fails with invalid expression
    By BBrayton in forum Queries
    Replies: 11
    Last Post: 01-06-2015, 06:10 PM
  3. Replies: 3
    Last Post: 02-12-2014, 03:36 PM
  4. "The expression '|' you entered is invalid"
    By chowse in forum Queries
    Replies: 3
    Last Post: 03-01-2013, 07:06 PM
  5. Replies: 13
    Last Post: 12-05-2011, 05:10 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