Results 1 to 3 of 3

Thread: Easy combo box question (probably)

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2002
    Location
    The shed at the end of the garden
    Posts
    2

    Easy combo box question (probably)

    I am trying to loop through a file and add the contents of one field from each record to a combo box. I am currently using the following code: -

    Do While Not unitselarray(Index).unit_name = ""
    Text8.Text = unitselarray(Index).unit_name
    Combo2.AddItem Text8.Text
    Loop

    but this keeps giving me error messages. Could someone please help?

    Thanks,
    Paul

  2. #2
    Bouncy Member darre1's Avatar
    Join Date
    May 2001
    Location
    Peterborough, UK
    Posts
    3,828
    well the first problem i can see is that Index never changes in the loop at all, basically its a continuous loop.

    also Index has not been initiated at all, perhaps it doesnt exist!

    what's the error message and which line of code???
    Confucious say, "Man standing naked in biscuit barrel not necessarily ****ing crackers."

    Don't forget to format your code in your posts

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2002
    Location
    The shed at the end of the garden
    Posts
    2
    duh! I completely forgot about incrementing index!

    The error message is "Invalid procedure call or argument" on the line Combo2.AddItem Text8.Text

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