How to populate a combo box from database table on Edit/Add?
I have a simple application that has 3 fields:
1-Task Name
2-Person Name
3-Cost
When I go to add or update a task, I want the data for the Person Name to come from the Person Names already added in the application (better yet from a separate person table)...
So on Add/Update Load event of a form, do this:
A-Have the Person Name as a drop down
B-populate the drop down list from the result of a "Select Distinct [Person Name] * from the entire data table"
I can do A, but B does not work since I can't seam to do Distinct or reference the entire set of records in the data table.
Example:
If the table has the following rows
Task1 John 10
Task2 Mark 20
Task3 Mark 4
When the user does Add/Update, I want the user to be presented with a drop down containing John and Mark only.
Thanks for your help.