DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2006

    Need the same combobox on multiple forms, tabs, frames, etc


    I'm writing an app in VB6 that has multiple forms, tabs and frames. In a number of situations I need the same combobox (populated with 1000's of customers names in the list and their acct numbers in the itemdata). Is there anyway I can dim a combobox in a module, populate it in Sub Main with the customer info from a recordset, call Form1 which loads and displays the combobox, calls Form2 which needs that same combobox on a frame, and so on?

    I don't want to have to load all the forms ahead of time. I basically want to populate a combobox once at startup and make it available to any form that needs it down the road.




  2. #2
    Join Date
    Nov 2003
    Portland, OR
    You may be able to use the SetParent API to move the populated combobox from one form to another at runtime, but that's a hack and would likely create more problems than it solves.

    I think the larger question is: Do your users want to scroll through thousands of items to find the one they're looking for? Rather than loading an entire table into the combobox, why not query the database in the background as the user types and populate the list with items that match the first character or two? If Google can do it, surely you can? ;-)
    Phil Weber

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. Replies: 0
    Last Post: 06-20-2006, 03:55 PM
  2. Forms Authentication, Frames, and the SignOut Method
    By Todd Willoughby in forum ASP.NET
    Replies: 2
    Last Post: 06-17-2002, 10:31 AM
  3. Activating 1 of multiple VB app Forms
    By Sam in forum VB Classic
    Replies: 0
    Last Post: 08-29-2001, 02:23 PM
  4. Activating 1 of multiple VB app Forms
    By Sam in forum VB Classic
    Replies: 0
    Last Post: 08-29-2001, 02:23 PM
  5. Submit multiple forms together from a page
    By Ashu Mahajan in forum Web
    Replies: 0
    Last Post: 03-30-2000, 01:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.