Results 1 to 7 of 7
  1. #1
    4 Star Lounger
    Join Date
    May 2002
    Location
    US
    Posts
    439
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Large List- best way to manage? (2003)

    Greetings!

    Ok, here is what I have. I am setting up a 'template' for some users, and there will be several picklists needed. I started using a combo-box, but it is taking forever to cut and paste the items into the control box information area.

    There are around 240 items...

    Any suggestions?


    thanks,
    Brad

  2. #2
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Large List- best way to manage? (2003)

    Hi Brad,

    Are you using the Forms toolbar to create the combo's or the Control Toolbox Toolbar.

    In either event though you will need to enter the combo values one by one. (AFAIK) The Control Toolbox method, using VBA to populate the list may be better in the long run as you can copy and paste the code and simply change the values in the additem property quite quickly!
    Regards,
    Rudi

  3. #3
    4 Star Lounger
    Join Date
    May 2002
    Location
    US
    Posts
    439
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Large List- best way to manage? (2003)

    Rudi,

    I am using the Controls Tool Box. Not Forms. How would I use the VBA to populate the list?



    Brad

  4. #4
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Large List- best way to manage? (2003)

    The combo box has an AddItem property. You can use it something like this...

    ComboBox1.AddItem "One"
    ComboBox1.AddItem "Two"

    However...to see the items in the combo box, this code needs to run in an event procedure such as when the document opens up or when the user clicks on the combo.
    Regards,
    Rudi

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Large List- best way to manage? (2003)

    Put code like this in the ThisDocument module of the template:

    Private Sub Document_New()
    Call FillCombo
    End Sub

    Private Sub Document_Open()
    Call FillCombo
    End Sub

    Private Sub FillCombo()
    With Me.ComboBox1
    .AddItem "This"
    .AddItem "That"
    .AddItem "Other"
    End With
    End Sub

    BTW, 240 items is a lot, I'd use fewer items or more combo boxes.

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Large List- best way to manage? (2003)

    If this is a list that does not change very often, you could include it in a code module and fill the box using Visual Basic methods. I'm not sure that's any more efficient than what you are doing now.

    If this is a list that might change more often, you could store it in a shared location and use Visual Basic methods to fill it dynamically when the document is opened or the user needs it.

    If the value should not change once the user has made her or his selection, then both of the above might be inappropriate.

  7. #7
    4 Star Lounger
    Join Date
    May 2002
    Location
    US
    Posts
    439
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Large List- best way to manage? (2003)

    All,
    Thanks! I will work through this.....

    Too bad I need to use one picklist, this will be a single item, not multi-select. So, I will just have to grin and have fun.

    thanks,
    Brad

Posting Permissions

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