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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Building a Listbox from a field in a table

Status
Not open for further replies.

f5snopro

Technical User
Joined
Feb 6, 2003
Messages
23
Location
US
I have a form (frm_choose_owner) with a listbox which I would like to dynamically build based on the values in a specific field in a table (tbl_ITMS_dump)I have. Trick is, I don't want duplicates in the listbox.

The values dynamically added to the list box will allow the user to select on and then it will be passed to a query.
 
Your row source for the combo should look something like this...

SELECT tbl_ITMS_dump.username
FROM tbl_ITMS_dump
GROUP BY Table1.username
HAVING (((tbl_ITMS_dump.username)=[Forms]![frm_choose_owner]![Text4]))
ORDER BY tbl_ITMS_dump.username;

Where I have user name just put in the name of the field in your table.

good luck
ssecca
 
Got it working! Thanks so much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top