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

Combo Box 1

Status
Not open for further replies.

Molson

Programmer
May 10, 2000
13
0
0
GB
I have two forms one which details orders made (Primary key is the Order Number). On this form I have many attributes which include company ordering from etc.<br><br>My second form I have invoices passed for payment, and therefore have the original order number as a primary key.<br><br>I have a combobox to pick which Order Number I am inputing invoice details for, however I want some of the Order Form<br>details (like the company ordered from) to automatically show when I pick a paticular Order. <br><br>I have set the relationship between the two forms, however I can seem to get the information appearing.<br><br>Please help
 
If I understand you correctly, this might work.<br><br>For the rowsource in your combobox, include all the fields that you want showing when an order is selected. For example, your rowsource SQL might be<br><br>&quot;SELECT Ordernumber, customer, date, pronumber, billto FROM Orders;&quot;<br><br>Set the combobox's columns to include 5 fields, then set the fields to show only the ones you want showing when it drops down. All the info you want showing is now contained in the combobox, even though it's not all showing there.<br><br>Put text boxes for each of the things that you want showing, customer, date, pronumber, billto, etc. For the datasource of each of the text boxes, make a reference to the combobox column where the info is hiding, like so:<br><br>=combobox1.columns(2).value<br><br>This would give you the date (or the third column in your query). Remember columns is a zero-based index.<br><br>Hope this helps.<br><br>Charles<br><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top