parameter query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

For a parameter query, i understand that is it possible to use the LIKE function to find similar characters
However, i have a problem.
Eg: i want to find the records containing the word "bee wax
In a parameter query, the LIKE function will return these records if i type in "bee
however, if i type "beewax" without spacing, no records will be returned
how should i set it to accept the word without any spacing

Thanks a million!!
 
Hi,


Like '*bee*wax*'


Hoping it may help,
Vanderghast, Access MVP


mary said:
For a parameter query, i understand that is it possible to use the LIKE
function to find similar characters.
 
yup, but in my parameter query, i have something like this.

Like "*" & [Enter name] & "*

how can i enter "beewax" without the spacing in the prompt and records will return records containing "bee wax"

Thanks so much in advance!
 
Hi,


I don't see any way to get "beewax" recognized as "bee*wax", since
it would also have to try "b*eewax" and all other possibilities,

but

if someone enter "bee wax", a replace may be used to replace all the
spaces with a * :

Access 2002 or later:


Like "*" & Replace( [Enter name] , " ", "*") & "*"


would indeed replace the space in "bee wax" by a star, so, "beewax" and
"bee wax" would become acceptable (but also would be "All the bee do not
produce candle quality wax" (ok, that's probably unlikely to occur, but you
get the picture) .




Vanderghast, Access MVP



mary said:
yup, but in my parameter query, i have something like this..

Like "*" & [Enter name] & "*"

how can i enter "beewax" without the spacing in the prompt and records
will return records containing "bee wax"?
 
Back
Top