PDA

Click to See Complete Forum and Search --> : Searching through records


Nov 15th, 2000, 05:04 AM
When searching a record I can only get a result if the user has put an exact match, but how can you get results witch contain the entered text. Also is there any way you can just show the results instead of the FindFirst function, and have a button that will show all the records again.

paulw
Nov 15th, 2000, 06:32 AM
The easiest way to do a search like this is to construct a SQL query and then base a recordset on it.

e.g. using Access and DAO


strSQL = "SELECT * FROM Table WHERE Field Like '*Text*';"

Dim rst as Recordset
Set rst = db.OpenDynaset(strSQL)


This recordset can then be displayed on, say, a pop-up form. No need to lose your original recordset.

Cheers,

P.