Problem using LIKE, if no * is used

J

John Hansen

Hey
I have a formular with a textbox, where the user can write a name using *
and/or ?
Then a subformular is opened showing the result of a simple query where I
use the LIKE operator.
It all works fine. Writing 'jo*' gives John, Jon, etc.
BUT
if the user writes 'John' (not using a * or ?) the query gives the wanted
result, but then a new query will show no results ! It doesn't matter
whether the new 'name' contains */? or not. If I then close the formular and
opens it again, then I all works fine again.

I tried to make 2 different subformulars, so after typing then name, I look
for */?. If one of them is typed in the textbox I open one subformular based
on a query using LIKE, otherwise I open an other subformular based on a
query using '='.
The result is still the same.

Can anyone give me the reason for this and help me with a solution ?

John Hansen
 
Top