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

Update list in Combo Box according to selection of previous Combo Box 2

Status
Not open for further replies.

towntopic

Technical User
May 15, 2003
103
US
Here's what I'm trying to do...I'm so close but just can't get it figured out...BOOOO!

Form has two combo boxes, Manufacturer and Model.

Three tables Hardware, Manufacturer and Model. Manufacturer contains a list of Manufacturers and Model contains models and manufacturers. Hardware is updated according to the user selections from the form.

On the form Manufacturer is the first combo box and I'm wanting to suppress the the available Models (second combo box) the user can choose according to their selection within the Manufacturer combo box.

I tried using the rowsource = to a SQL statement, but something just isn't working correctly.

Thanks in advance for any help.

-john
 
I use this often for my reports. I usually have cboCategories and cboReports. Then a table called tblReports that has the following fields: Category, ReportName, ReportTitle.

cboCategories rowsource is set to "SELECT Category FROM tblReports GROUP BY Category;"

cboReports rowsource is set to "SELECT [tblReports].[ReportName], [tblReports].[ReportTitle], [tblReports].[Category] FROM tbl_Reports WHERE ((([tblReports].[Category])=[Forms]![frmReports]![cboCategories])) ORDER BY [tblReports].[ReportTitle]; "

Then I type in code for cboCategories onChange event:
cboReports.Requery
 
Hi Onyxpurr,

I am a newbie, but I always seem to come up with grandeous design plans. The past 3 days I've been all over the web trying to figure out how to make those pesky combo boxes cascade. I diligently tried every suggestion I could lay my hands on.

Yours was the only code that actually worked.

Thanks a heap. Keep up the great work!!

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top