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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Statement

Status
Not open for further replies.

search

Technical User
Apr 23, 2002
2
DE
I need the quesry to select the employees name from the database through search.On that it has to check both small and caps letters and if somebody has the name TWO alike RAM KUMAR, but i am typing the name kumar in the search field but the search has to display the name where the it find the second name = that key value.
 

Searches in Access are case-insensitive. The basic syntax is like the following Select statement. It will find all variations of upper and lower case spellings.

Select * from Employees Where EmpName Like '*kumar*'

If you want the user to type the search name in a text box, you could create a query like the next query where the criterion is the value typed into the text box.

Select * from Employees Where EmpName Like "'*" & forms!SearchForm.SearchText & "*'"

This query assumes that the search form is named SearchForm and the text box is named SearchText. You would need to open the query in some event such as a button click. Terry
------------------------------------
Blessed is the man who, having nothing to say, abstains from giving us worthy evidence of the fact. -George Eliot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top