Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find using "Like" in an unbound textbox to a list box 1

Status
Not open for further replies.

end922

Technical User
Apr 17, 2007
59
US
Ok, I am not sure how to explain this but I will give it a shot.
I have a form "NewRegUpdate" that has 2 unbound text boxes
"Lname" and "Fname" and a list box called "txtsearchresults".
TxtSearchResults row source is a query using an Assignments table listing the fields displayed in the txtsearchresults list box.
The criteria for the row source is....
Like [forms]![NewRegSearch]![LName] under lastname in the assignements table.

My question is I want to be able to seach using any part of the last name or at least the begining letter of the last name. Currently if I type in the exact last name I get a record in my list box. I need the ability to have the user search by partial name.
I've tried to manipulat the iff statement in my record source with no luck.
Any suggestions would greatly be appreciated.

Thanks
Eric
 
How About
Code:
Like "*" & [forms]![NewRegSearch]![LName] & "*"
 
More than what I got. :)
(I was trying the same thing but I put * not "*".

Problem though
Upon open of the form all records in the assignements table display in the list box.
txtsearchresults is triggred by afterupdate on either lname or fname.
I am trying to think of way to force txtsearchresults to be null upon open until the trigger is activated.

Thanks for the tip.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top