Re: listview problem....
- From: Jan Hyde <StellaDrinker@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 30 May 2006 11:56:53 +0100
"Dave" <nobody@xxxxxxxxxxx>'s wild thoughts were released on
Tue, 30 May 2006 10:43:20 +0100 bearing the following fruit:
"Jan Hyde" <StellaDrinker@xxxxxxxxxxxxxxxxxxx> wrote in message
news:7udd729b9q1j75eh6j1mhmdrd2tpopame7@xxxxxxxxxx
"Dave" <nobody@xxxxxxxxxxx>'s wild thoughts were released on
Thu, 25 May 2006 16:04:27 +0100 bearing the following fruit:
Leading digits would be a problem because the listview, treeview and
related
controls don't allow keys that start with a number (to prevent confusion
with indexes as either can be used).
People often want to store a number as a key. The *best* way
to achieve this is append a character to the *end* of the
number...
In other words, your quite wrong about that, but don't take
my word for it, try it yourself.
Mea culpa
Strange, I often use a database record ID as the key with a letter or two to
stop the key from being a number. For some reason I must have thought that
the type coercion seen in Val() and CLng() applied here where it converts
until it runs out of digits.
That it doesn't will make life a bit easier - thanks for pointing me into
the right direction.
Indeed, adding a letter to the end means you can use the Val
function on your key to get the ID, which is easier than
stripping off leading characters.
Jan Hyde (VB MVP)
--
Winsome: An average basketball team (Stan Kegel)
.
- References:
- Re: listview problem....
- From: DanS
- Re: listview problem....
- From: vonClausowitz
- Re: listview problem....
- From: DanS
- Re: listview problem....
- From: vonClausowitz
- Re: listview problem....
- From: Jan Hyde
- Re: listview problem....
- From: Dave
- Re: listview problem....
- From: Jan Hyde
- Re: listview problem....
- From: Jan Hyde
- Re: listview problem....
- From: Dave
- Re: listview problem....
- Prev by Date: Re: Help me to fix "Win XP SP2 and SaveSetting" Problem
- Next by Date: Re: Newbie Data Type Problem
- Previous by thread: Re: listview problem....
- Next by thread: Inserting text at a specific point
- Index(es):
Relevant Pages
|