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

Using a form to input data into a combo box then display in text box?? 3

Status
Not open for further replies.

Quickchange

Technical User
Jan 31, 2000
4
FR
I have a database that contains information on projects. Project name, what projects are linked to a particular project etc. One of the things that I need users to enter on the form is all the Linked Projects for any other given project. In other words what projects are linked to the one project for a particular record? I want to have a combo box where users can select from a list of projects that come from a table. Ideally they will be able to select one or more of these projects from the list and then have those selections reflected somewhere else in the form like a text box. I currently have a combo box that displays the projects but I can only select one and display it in the combo box. I would like to be able to make several choices and have that reflected somewhere else on the form. Thanks in advance
 
I've used ListBox's for this...in the double-click event of the listbox you can put code that will insert the value of the selected item into another textbox, or, ie. another listbox:<br>
[in double-click of list1]<br>
Me!List2.RowSource = Me!List2.RowSource & &quot;;&quot; & me!list1<br>
<br>
This is not saving the values, however, into list2, so to save these multiple values, you'll probably need (or maybe already have) a child table related to that Project table. List1's source is a select statement giving your possible values, the list2 source would be a select statement based on the child table, using the current record key as the where clause. The above statement would instead be an INSERT statement into that table, followed by the requery of the listbox<br>
--Jim
 
Thanks to Jim and Elizabeth it works great.<br>
<br>
Thanks a bunch.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top