Results 1 to 3 of 3

Thread: Listbox only showing one item

  1. #1

    Thread Starter
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,604
    Hey guys.
    Sb must have had this problem before.

    I have a filter thru comma sep. values that adds items to the listbox only if they meet certain criteria

    To make certain that it was not an error in the filter, I used a label whose captions shows the number of results found (intNumRecords). Problem is only one line is showing in the list box.

    Here is my code (roughly):
    For intNum = 0 to intNumRecords 'the # of records found
    List1.AddItem strLine(intNum),intNum
    Next intNum

    Looks simple enough but when I run it, only the first one shows (Record #0). Why doesn't this work?

    Any ideas?

  2. #2
    Addicted Member
    Join Date
    Jul 2000
    Location
    Scotland
    Posts
    184
    Don't know but I'll ask some basic questions that you've asked yourself anyway.

    Does the Array strLine() contain values?

    Is intNumRecords > 1?

    Is it looping as expected?

    Have you tried it without the Index explicitly, I never use it?

    Try
    Code:
    from intNum = lbound(strLine) to ubound(strLine) -1
         List1.AddItem strLine(intNum)
    next intNum

  3. #3
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    code would help..all you have there is a loop
    Too many where what how's to guess at.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

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