troubleshooting Question

Defining a Class to Select Instances

Avatar of Declan Basile
Declan BasileFlag for United States of America asked on
Visual Basic.NET.NET Programming
8 Comments1 Solution120 ViewsLast Modified:
I want to define a class in which I can open a form with two listboxes side by side.  The user will be able to double click an item in one listbox to move that item to the other listbox.  The listbox to the left will be unselected items, and the listbox to the right will be selected items.  I want to fill a generic recordset with fields "PKid", "instancename", and "selected" and open the form with that recordset.  "Selected" is a Boolean field.  Any records with selected = True will show in the listbox on the right, otherwise the record will show in the listbox on the left.  Double clicking an item will toggle the selected field for that record and requery the listboxes.  In some cases I'll fill the recordset with Employees from the Employees table so users can select a group of Employees, in other cases I'll fill it with Operations from the Operations table so the users can select a group of operations, etc.  When the form is closed by the user I'll have a recordset of elements of which I'll know which ones were selected by the user.  
To accomplish this, would I have a class called "Selection" with a Recordset property and a "SelectInstances" method to open the form?  How would I define the fields in the recordset and fill the recordset with the data from a SQL statement or stored procedure?
ASKER CERTIFIED SOLUTION
ste5an
Senior Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros