combobox tied to internal table or recordset
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: combobox tied to internal table or recordset

  1. #1
    Join Date
    Sep 2013
    Posts
    3

    combobox tied to internal table or recordset

    Hi,
    I have quite a bit of experience in VB6 and use it to create applications for communicating with our products.
    I have not used databases.
    I have an application something like -

    The application comes up to show 8 combo boxes each box has the full set of keyboard keys available to it, so for instance on the first drop down you can, (and do) select key a. On the next dropdown box you can now select b-z but not a (since it was used).
    For 8 keys on the keyboard the user can select an action (i.e. turn on a light or make as sound).

    What I need is the way to remove 'a' (or any other key) from the selectable set once it is selected.

    I believe this is perfect for a database, so I wanted to create and internal table or recordset that would be tied to the comboboxes for just this purpose but I do not see any help on doing so.

    Does anyone have any info on such a thing?

    Thanks,
    Martin

  2. #2
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,986

    Re: combobox tied to internal table or recordset

    If you need to save those 8 key fields only (plus more db fields), you'd just store them as one string of characters. Then, many rows of data. If that's now what you have in mind, then a DB is not for this.

    I'd create an array (7,25) and just load them all with 0's to start out. Each combo would search the array to eliminate used positions
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,844

    Re: combobox tied to internal table or recordset

    Agreed, no need for a db for that

    You could also build the combos with all the characters in them initially and then remove the characters from the other combos as they are selected.
    Always use [code][/code] tags when posting code.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center