Spaces in Search As You TypeUpload ImagesLink Adam Schwanz 2 years ago
Hello Richard, I have this working I believe with a macro to open the selected customer as well, however I'm unable to add spaces into the text field. I may be missing the obvious but how can I add spaces so I can do like Fort Myers, Fort Lauderdale etc without just searching the last word?
Yeah, that's a tricky one. I'll have to think about it. The way I have the code written (if memory serves, it has been 2 years since I recorded that) every time you press a key the string gets "trimmed" so the trailing space would be removed. All I can think of is you'd need to keep a second hidden text box or memory variable with the actual value you type in that doesn't get trimmed.
Todd Auer 2 years ago
I was able to accomplish the spaces by: 1.Make list box. Go to properties, select row source "...", Expr:1 [field 1] & [field 2] 2.Make a SearchBox. Go to properties and set the On Change with Code builder type DoCmd.Requery "List Box" 3.Like "*"& [Forms]![Form Name]![SearchBox].[Text] &"*" The .Text will select the text inside of the searchbox
I am also wondering how to make this happen with VBA, can't wait for the update. Thanks!
OK, I was looking this over and it turns out that I did cover this in the Access Search Seminar. Now, if you don't want to spend $200 on the seminar, I have posted just lesson 33 which solves the "trailing space" problem to my YouTube Channel for GOLD Members and up. Cost of Gold membership right now is only $9.99. You'll get access to that video plus a whole bunch of other stuff including my TechHelp Extended Cut videos. In the future, when issues like this arise - questions about things I've covered before from Seminars - I'll post them like this. I don't really have an easy way to list videos separately HERE on my web site, and it wouldn't be fair to people who did buy the Seminar to waste their time making them watch it in Developer 17, so this solution works for everyone. Enjoy!
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.