Results 1 to 6 of 6

Thread: [RESOLVED] [2005] Listbox index issue

Threaded View

  1. #1

    Thread Starter
    Addicted Member Genom's Avatar
    Join Date
    May 2006
    Posts
    186

    Resolved [RESOLVED] [2005] Listbox index issue

    Hi;

    I have a table in my database which contains 2 columns: ClientID, ClientName.
    I want to put Clientnames to a listbox and clientid as indexes of each clientname. eg:
    ClientID ClientName
    1 Boosh
    4 Sarkizy
    7 Bleir
    95 Puteen
    214 Tayyeap

    Now I add every client to listbox but if I try to use insert function, so that I can add them with clientid's as their indexes, I get an error which tells me that 1 is not an available value for an index. I know that arrays are beginning with 0 in listbox but I want to store the clientid's with clientnames.

    I have found a solution: I can add every item like this
    Boosh [1]
    Sarkizy [4]
    Bleir [7] etc... But I will need their ID's later and I have to write another sub to extract their ID numbers from string. But it will limit user to use [] characters for Clientnames. Do you know a better solution?
    Last edited by Genom; May 24th, 2007 at 11:15 AM.
    Dim Me As Coder

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width