I am working with a treeView. Tree view keys must start with an alpha
charactor and does not allow you to use the same key twice in the treeview.
My key field is a numeric field that I am appending an "a" to like this:
set treekey = "a" & strTreeKey
becuase my tree can have duplicates, I pick up the error and change the "a"
to "b" with a statement in my err trapping like this:
if left(treekey,1) = "a" then
treelkey = "b" & strTreekey
elseif left(treekey,1) = "b" then
treelkey = "c" & strTreekey
and keep repeating the logic at least until I get to i.
Is there a way to test a alpha value and then get the next letter?
> I am working with a treeView. Tree view keys must start with an alpha
> charactor and does not allow you to use the same key twice in the treeview.
[quoted text clipped - 13 lines]
>
> Is there a way to test a alpha value and then get the next letter?
some_character = Chr(Asc(some_character) + 1)
You might want to give some thought to the case where some_character = "z",
though...
aWs - 27 Sep 2005 18:38 GMT
Thank you. It was the nugget I was looking for. There is an outside chance
the program my go past "z" so if that happens I have it starting again at "A".
Treeview treats case differances as separate keys
> > I am working with a treeView. Tree view keys must start with an alpha
> > charactor and does not allow you to use the same key twice in the
[quoted text clipped - 20 lines]
> You might want to give some thought to the case where some_character = "z",
> though...