Searching more than one field/any part of field.

  Mr A! 11:58 06 Oct 04
Locked

I am using a search function as described in thread click here. I have a keywords field and would like to search the whole field with the QBF function. Is there a way to do this as it will not recognise "art" in painting, art, drawing.

Also can i search a number of fields at once with this Query By Form function?

Thanks in advance.
(If you have a script which is fairly large, just send it to me by email by clicking the envelope at the top).

  Rigga 12:03 06 Oct 04

Just a quick suggestion, have you tried to see if "%art%" will work in your search?

The % is the wildcard character within SQL server, and may be simliar in access!

R.

  Mr A! 12:42 07 Oct 04

%art% didn't work. Any more ideas?

  Rigga 13:09 07 Oct 04

Just looked at access and it says that * is the wildcard character so when you define your query criteria, you can specify like instead of =, as below

like "*art*"

or having looked at the example in the other thread I would guess that the = is implied, in the line
"Criteria: Forms![QBF_Form]![WhatCustomer] Or Forms![QBF_Form]![WhatCustomer] Is Null"

so maybe try
"Criteria: LIKE Forms![QBF_Form]![WhatCustomer] Or Forms![QBF_Form]![WhatCustomer] Is Null"

Then try entering your "*art*" in the search text boxes.

HTH. R.

  Rigga 13:13 07 Oct 04

P.S. having looked at the MS KB article, towards the end it shows that you can use the LIKE keyword. and you can also append the "*" automatically, so the criteria line would read

"Criteria: LIKE "*" & Forms![QBF_Form]![WhatCustomer] & "*" Or Forms![QBF_Form]![WhatCustomer] Is Null"

Then you would only enter "art" in your search box, and it would add the two asterisks for you.

R.

This thread is now locked and can not be replied to.

Amazon Fire HD 8 review: A brilliant combination of function and value – with one massive caveat

1995-2015: How technology has changed the world in 20 years

How to create an introvert-friendly workplace

Apple Watch Series 2 review | Apple Watch 2 review: New Apple Watch is faster, brighter,…