MS Access – Search with Spaces in Terms

MS Access Text Search with SpacesEvery developer at some point or another ends up needing to create a search functionality where their user(s) can enter what they know (terms, text, …) and pull up any matching records.  The problem being that you will quickly come to smack your head against your computer because once you setup a search textbox control and perform the most basic test, you will notice that Access truncates any spaces you enter making your search functionality completely useless.

Having faced this problem many years ago, and having recently been asked by fellow MVPs how to resolve this problem, I decided to create the following demo database.  In it, I demonstrate 2 similar approaches to work around Access’ native behavior and enable proper full text search.

Disclaimer/Notes:

All code samples, download samples, links, ... on this site are provided 'AS IS'.

In no event will Devhut.net or CARDA Consultants Inc. be liable to the client/end-user or any third party for any damages, including any lost profits, lost savings or other incidental, consequential or special damages arising out of the operation of or inability to operate the software which CARDA Consultants Inc. has provided, even if CARDA Consultants Inc. has been advised of the possibility of such damages.

Download

Feel free to download a copy by using the link provided below:

Download “Access - Search with Spaces in Terms Demo” TextSearchDemo.zip – Downloaded 18100 times – 89.26 KB

3 responses on “MS Access – Search with Spaces in Terms