Re: listview problem....

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"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)

.



Relevant Pages

  • Re: listview problem....
    ... controls don't allow keys that start with a number (to prevent confusion ... People often want to store a number as a key. ... For some reason I must have thought that ...
    (microsoft.public.vb.general.discussion)
  • Re: hash
    ... # push each store into array associated with its parent store ... elsif($size_type eq "Euro") { ... sub xmlEscape ... Usually it is an ASCII control character. ...
    (perl.beginners)
  • Re: Remove special formatting characters from textbox contents
    ... What I'd do is cut 'n paste specific character from the Word document into your TextBox ... controls to isolate *exactly* what's causing the problem. ... Controls AfterUpdate event. ...
    (microsoft.public.word.vba.general)
  • Re: What Needs to Happen in Secret Invasion
    ... the comic then it MIGHT have created confusion. ... As a reader, there is ... know more than any single character in the comic. ... Captain America in Avengers is a skrull. ...
    (rec.arts.comics.marvel.universe)
  • Re: RichTextBox Horizontal Scroll
    ... I've already sized the extent of this font ... and have calculated the effective height and width of each character. ... I am scrolling the RichTextBox in synch with some other controls using ... there are some annoying problems with these scroll bar ...
    (microsoft.public.vb.controls)