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!

Combo Box

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I have a form that I am making which is based on a query. Ideally, what I would like to happen is to have a combo box named Vendors. When I select a vendor from this combo box, I want all of the records in association with this vendor to appear...such as pricing, products, etc. So far I have the combo box with the list of vendors but the records will not respond when I choose anything. How do I make the pricing and products, etc. respond when I choose from the combo box?
 
Here is what I think you want to do. Create a form as a dialog box with an unbound combo box field and a command button next to the field marked display vendors.

This form will be opened from a switchbord button as a menu selection to display a specific vendor's records.

The command button on the dialog form should have a row source query to display vendors from a table of vendors or from the primary data table with vendor names. The vendor is selected from the combo list and then the command button is clicked.

In the OnClick event of the command button you should place a line of code - DoCmd.open "frmMainForm" this will diplay the form that shows all the records for the specific vendor chosen from the combo box.

Now, the query that feeds this form needs to have a parameter set in the query field that contains the vendor data. The parameter needs to represent the control value from the dialog form combo box. This is placed in the criteria line in the query field.
When the form opens it displays the vendor records you have selected via the combo box.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top