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

Filter all records based on selection

Status
Not open for further replies.

woter324

Technical User
Jan 26, 2007
179
GB
Hi,

I think I lost my last brain cell this weekend as I just cannot think where to start on this one...

I have a simple table with four columns. I'd like to be able to select any text in any record, click a button, and all records, containing that selection are returned.

For example:

Lastname | FirstName | Extension
--------------------------------------
Smith | John | 1234
Doe | John | 3241
Richards | Sarah | 2234


If I selected the 'i' in Smith and clicked my button, then "Smith, John, 1234" and "Sarah, Richards, 2234" would be retuned. Similarly, if i select 'John' and clicked my button, then "Smith, John, 1234" and "Doe, John, 3241" would be returned.

I know this is a little lame and I have no tried code, quiries and filters to offer, but I am struggling in working out how to get started on this. Any pointers would be gratefuly received as always.

Many thanks


Woter
 
This may give you some ideas
Code:
SQL = "Select LastName, FirstName, Extension " & _
      "From SomeTable " & _
      "Where LastName & " " & FirstName & " " & CStr(Extension) " & _
      "      LIKE '*" & SearchFor & "*' "
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top