|
-
Jun 27th, 2002, 10:08 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] Elegant cbo Population
So if we're agreed that data-bound controls are evil (and I do believe they are now), what is the most elegant/fastest/easiest way to populate a combobox w/ a list of items and their associated IDs?
To use a simple example,
"SELECT tblProject.ProjectName, tblProjectID FROM tblProject"
gives me the two things I need. ProjectName gives me the items I want to populate the cbo with so my users have something readable, and ProjectID gives me the key value to do my thing behind the scenes.
Populating the combox w/ ProjectName is obviously easy as I just loop through the recordset.
The crux of the matter is how do I keep track of the associated ID when they click on an item in the combobox?
Disconnected recordset? Array?
If this influences the answer at all, we're talking about ~100 records or so. And yes, they all need to be available to the user.
Last edited by Briantcva; Jun 27th, 2002 at 11:10 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|