Searching more than one field/any part of field.

  Mr A! 11:58 06 Oct 2004

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 2004

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!


  Mr A! 12:42 07 Oct 2004

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

  Rigga 13:09 07 Oct 2004

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.


  Rigga 13:13 07 Oct 2004

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.


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

Elsewhere on IDG sites

WPA2 hack: How secure is your Wi-Fi?

Add Depth Of Field to a photo using Tilt Shift Blur in Photoshop

iPhone tips & tricks

Comment afficher des fichiers cachés sur Mac ?