Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2010
    Posts
    22

    Unanswered: Handling Special Characters (#, -, etc) From User Input

    Good Morning All,

    I have a form in which a user selects an entry from a drop down menu or enters free text. This text is used as the search criteria.

    Using [forms]![frm_User_Input]![List1], I get the data and display results based on the user input. Everything has been working fine. However, I just realized that an expression with a # is not being displayed. I tested my theory by searching using *[#]*. It displays perfectly, however I cannot have a user to follow this pattern.

    How can I process a string containing a special character so that the search is seamless to the user?

    Thanks!

  2. #2
    Join Date
    May 2010
    Posts
    601
    Try:

    Replace (MySearchString, "#", "[#]")
    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

Tags for this Thread

Posting Permissions

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