November 3, 200619 yr Searched the forum threads for this problem but came up empty handed. I am searching the "last name field" for names M I also get the "Smith-Doe" name included in the search. Is there a way to avoid getting these hyphenated names in both searches? Many thanks,
November 3, 200619 yr you will probably have to create a calculation field to search in instead of the field itself. The calculation field would be something like this: TheSearchField Left ( TheField ; Position ( TheField ; "-" ; 1 ; 1 )-1 )
November 3, 200619 yr Author Many thanks Stuart, I will set up this field and let you know how it works..........Ray
November 3, 200619 yr Author Stuart, the calculation works great and returns the characters to the left of the hyphen but if the field is not hyphenated it is left blank. I also need the calculation to put the last name in the field if it is not hyphenated. Thanks, Ray
November 3, 200619 yr You can put a case in Stuart's calc for it to be: Case ( PatternCount ( TheField ; "-" ) > 0; Left ( TheField ; Position ( TheField ; "-" ; 1 ; 1 )-1 ); TheField ) or you can change the calc field to filter out the name and go that route Filter ( TheField ; "ABCDEFGHIJKLMNOPQRSTUVWXYZ" )
November 3, 200619 yr Thanks mr_vodka for adding in my rather daft oversite : I've always liked the idea of designing a whole database on paper without actually doing it (kind of like musicians sheet music) Guess i need to wait a while before doing that... hehe Edited November 3, 200619 yr by Guest
November 3, 200619 yr Author John, works slicker than greased lightning! I am not very familiar with many of the functions but I can see the "Case" function works like an "If" statement. Many thanks to you and Stuart for your kind assistance..............Ray
Create an account or sign in to comment