Results 1 to 4 of 4

Thread: Adding Items in Combo Box

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Location
    Posts
    1

    Cool

    Hi! I have a problem using the combo box control.

    I have an Access database with a table called Customers with existing records. How do I create a combo box in the VB form which will automatically look up the field called CompanyName from the table without me having to type the records into the List property one by one or use the AddItem method to add the items as I have over 200 records? Also, I do not want to allow the users to be able to add items to the combo box but allow them to look up the list once they key in a letter.

    I would deeply appreciate it if anyone could help me out here. Thanks.
    Aileen Yong

  2. #2
    Hyperactive Member
    Join Date
    Feb 2000
    Posts
    284
    Well if you stick the 'AddItem' inside a loop it wouldn't be all that bad would it?

  3. #3
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    Is the VB form part of a true VB application or is it an Access form? Access has some methods available that make what you want to do trivial. With VB you have to code round it.

    Cheers,

    P.
    Not nearly so tired now...

    Haven't been around much so be gentle...

  4. #4
    Lively Member
    Join Date
    Mar 1999
    Posts
    93
    In order to provide read-only acess for users just set style of your combo to DropDown List. This will enable only selection of existing items
    Regards,
    Vit

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