|
|
Question : multiple search terms?
|
|
Ok, I used a query to search a table using: Like "*" & [Please enter your search term(s)] & "*" But this only seems to work when you only have one word to search for, how could I modify this so you can search more than one word? IE "John smith" instead of just "john"
|
Answer : multiple search terms?
|
|
No problem I'm guessing that you version of Access is prior to 2000, replace is a function that became available in Access 2000... Or was it XP... I can't remember...
you can write your own replace function by
Public Function Replace(MyStr, ToReplace, ReplaceWith) Dim ReturnVal For I = 1 to len(myStr) If (mid(myStr,i,1)=ToReplace) ReturnVal = ReturnVal & ReplaceWith else ReturnVal = ReturnVal & mid(myStr,i,1) end if next Replace=ReturnVal end function
Simply put the below function in a module. You can then call it as needed
|
|
|
|
|