Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to populate list box with user-function

Status
Not open for further replies.

ywenz

Programmer
May 29, 2003
21
0
0
US
Hi, I want to populate a list box from a column from a table in my DB. Additionally, I want to add an "ALL" row to the listbox to signify that the user wants to select all from the list box. So how do I add more rows after populating the box with data from a table? Thanks
 
Instead of populating from a table, populate from a query. One method is to use UNION in the SQL statement:

Select column_name from your_table
union
select "All" from your_table
;


 
Hi ywenz,

It might be easier to have a separate checkbox "Select All" and you could select all the items in the list (or deselect them) when checked (or unchecked).

Enjoy,
tony
 
See thread181-565043.

==
Jeremy Wallace
AlphaBet City Dataworks
Affordable Development, Professionally Done

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top