Hello,
I want to search in a table. In a textbox the user had to type the name of the name of the person he is looking for.
In the table is a person called "Marinus". I want, when the user types "Mari" that "Marinus" is found.
My SQL statement looks like this:
Dim rstthumbs As Recordset
Dim dbs As Database
Dim Txtz As Control
Set dbs = CurrentDb()
Set rstthumbs = dbs.OpenRecordset("SELECT * FROM tblNaam")
Set Txtz = Me!zoeknaam 'the textbox where the name is typed
--------------------------------------------------------------------
The 'criteria checker' looks like this:
If rstthumbs("naam") Like Txtz Then GoTo Found
rstthumbs.MoveNext
Loop
The 'Like' part doesn't work!
Can someone help me please?
Thanks in advantage.
Albert
I want to search in a table. In a textbox the user had to type the name of the name of the person he is looking for.
In the table is a person called "Marinus". I want, when the user types "Mari" that "Marinus" is found.
My SQL statement looks like this:
Dim rstthumbs As Recordset
Dim dbs As Database
Dim Txtz As Control
Set dbs = CurrentDb()
Set rstthumbs = dbs.OpenRecordset("SELECT * FROM tblNaam")
Set Txtz = Me!zoeknaam 'the textbox where the name is typed
--------------------------------------------------------------------
The 'criteria checker' looks like this:
If rstthumbs("naam") Like Txtz Then GoTo Found
rstthumbs.MoveNext
Loop
The 'Like' part doesn't work!
Can someone help me please?
Thanks in advantage.
Albert