Can't filter a form using a string with a comma RRS feed

  • Question

  • I have an Access 2010 form.  When I right-click a field and select "contains" and enter a string that contains a comma, I get "Enter a valid value".  Any string without a comma filters fine. The field is connected to a short text column.  I tried quotes. No luck. Any ideas?
    Monday, July 17, 2017 7:23 PM

All replies

  • Hi,

    Not sure but it might be a bug. Have you tried looking at Access UserVoice if it has been submitted before? If not, you might consider submitting it.

    Just my 2 cents...

    Monday, July 17, 2017 7:39 PM
  • Hi NeuroTransmitter,

    I can reproduce your issue, it seems that there is format verification on the input dialog.

    As a workaround, you could use VBA code to filter a form using a string with a comma.

    Here is the example.

    Dim frm As Form

    Set frm = Forms!tblyearclasses 'tblyearclasses is the form name

    frm.Filter = "[ClassCode] Like '*2,*' " 'ClassCode is the field name

    frm.FilterOn = True

    Best Regards,


    Friday, July 21, 2017 2:39 PM
  • Thanks Terry.  My users need to filter by right-clicking the mouse. They will just filter around the comma. I'm going to assume this is a bug and I have reported it to Access User Voice.
    Tuesday, July 25, 2017 7:42 PM
  • NeuroTransmitter -

    Although you say this about strings, is it possible it is about numbers, and there is a check on the value?

    peter n roth -, Maybe some useful stuff

    Tuesday, July 25, 2017 8:47 PM