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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Searching a string field 1

Status
Not open for further replies.

TheBlondOne

Programmer
May 22, 2001
346
GB
Hi all,
I am designing a report for different schools e.g(Catholic, Church of England etc..)to go to different addresses when run, my problem is this. I need to search through the school name to see whether or not it contains the letters CE(C) and then display a 1 infront of the school name if it does so that i can use this as an identifier to select the relevant address. I have tried using a for loop to search the string, but to no avail (i am probably doing something wrong). Hope that makes sense. Can someone help me please.

Thanks in advance
 
Try a formula:

If {Fieldname} like '%STRING% then 1 else 0.

This will return the control value to select the addresss.

You then need to put each of the various addresses into a separate detail section. You then suppress the section depending on the control value.

Hope this helps.

Bill
 
Cheers Bill thats done the trick, i think i was trying to do things too complicated. Thanks a lot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top