Results 1 to 2 of 2

Thread: Arrays/DB: Question.

  1. #1
    Guest

    Talking

    I have two combo boxes:
    cboCategory
    cboSearchEngines


    I want to load a different list of search engines for each category, and I want each item in the list to have a hidden value for the app's use.

    I think a DB can help.
    Any ideas?

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    This should be pretty straitforward:
    Create a database (an Access DB should work nicely) with 2 tables. One having the categories you want. This table should have an autonumber ID.
    The second table has all the search engines and a field with the CategoryID that it belongs to.
    When you fill up the cboCategory combo set the ItemData property to the ID from the database.
    Now when a user clicks on an item in the cboCategory combo just look up the ID from the ItemData and use it to make a SELECT statement in the SearchEnginge table to get a recordset containing all the search engines that belong to that category.
    Now just loop through the recodset and fill the cboSearchEngines combo box.

    Good luck!

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