View Single Post
  #10 (permalink)  
Old 01-22-2008, 08:08 PM
RandomCoder's Avatar
RandomCoder RandomCoder is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 485
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Thanks, but comments like that will surely make me big headed

Once I attempted the problem for myself I saw where the difficulty was.
Because you were stripping out the contacts that hadn't got a number, this meant that the Items in the ListBox containing the names was no-longer concurrent with the PIM Items.
You could also try using FindItem to locate the last name of the contact etc. But as this requires some string manipulation and relies on contacts having a unique last name (not always the case when you look at Aunts, Uncles and Cousins etc), which is why I deemed an ArrayList to be a much more simple solution.
Also note that you only need to initialise the objects once, and if required you can dispose of them when you've finished with them.

Regards,
RandomCoder
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD.
Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD.

"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote