At 7:37 AM -0400 7/30/03, Rick Davis wrote:
My problem is what to do when I have Michelle Anderson, Michael
Anderson and Mickala Anderson all in the same list (real people in a
local school). Mac OS X does not allow duplicate short names and
they would all be andermic. I would like my app to compare the
short name generated and if a duplicate change the last character to
a number 1, 2, etc as needed.
Well, you've pretty well described it:
while NameAlreadyUsed(name)
name = Left(name, Len(name) - Len(str(num))) + str(num)
num = num + 1
wend
Cheers,
- Joe
--
,------------------------------------------------------------------.
| Joseph J. Strout REAL Software, Inc. |
| joe at realsoftware dot com http://www.realsoftware.com |
`------------------------------------------------------------------'
---
A searchable archive of this list is available at:
<http://support.realsoftware.com/listarchives/search.php>
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
.
|