Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search In multiple fields 1

Status
Not open for further replies.

ajr1705

Programmer
Apr 12, 2006
27
GB
I am trying to write a formula so that it searches through
Multiple fields to find values in address fields.

I want use the formula to extract only these that meet the selection.

E.g.
Fields are say add1, add2, add3 etc

I want to search for the string "GAHANA" or "ENGLAND", this could be in upper or lower case.
I would also like to may be take the first 3 digit and compare that.

Any help would most appreciated
 
Hi,
If the # of fields is known then just create a test for each field something like:
Code:
(
UPPERCASE({add1}) like '*GAHANA*' or UPPERCASE({add1}) startswith  'GAH'
)
OR 
(
UPPERCASE({add1}) like '*ENGLAND*' or UPPERCASE({add1}) startswith  'ENG'
)

Repeat as needed for each possible field..

Then get the design changed..

[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
It searches and does what? Highlights them, filters the rows to only those found, or?

You can use the record selection formula with a LIKE predicate, such as:

{table.add1} like "*" + {?MyParameter}
or
{table.add2} like "*" + {?MyParameter}
or
{table.add3} like "*" + {?MyParameter}

Which would limit the rows returned to the report to those which had that text within one of those fields.

-k
 
Ooops, you should use:

{table.add1} like "*" + {?MyParameter} + "*"
or
{table.add2} like "*" + {?MyParameter} + "*"
or
{table.add3} like "*" + {?MyParameter} + "*"

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top