The properties in the combos were goofed. Also the Customer combo was goofed. For the Customer combo, click the elipses (...) within the property shhet that is next to the Row Source field. Use the Query Builder to bring the ID field and the name field into your combo. If you bring the ID field first, this will be in the first column of your combo and the Bound column property will be "1".
Column Count 2
Column widths 0,3
Bound Column 1
Then, your other combos need their SQL cleared from the property sheet. Adjust the Column Count, widths and bound column accordingly.
Add some code to the page load event to clear your combos.
Code:
Me.cboLocations.RowSource = ""
Me.cboProducts.RowSource = ""
Me.cboProductTypes.RowSource = ""
Me.cboLocations.Value = ""
Me.cboProducts.Value = ""
Me.cboProductTypes.Value = ""
The code for your Customer and Locations combos AfterUpdate should look like this.
Code:
Private Sub cboCustomers_AfterUpdate()
Me.cboLocations.RowSource = "SELECT LocationsID, Locations FROM" & _
" Locations WHERE CustomersID = " & Me.cboCustomers & _
" ORDER BY Locations"
Me.cboLocations = Me.cboLocations.ItemData(0)
End Sub
Private Sub cboLocations_AfterUpdate()
MsgBox Me.cboLocations
Me.cboProductTypes.RowSource = "SELECT ProductsID, ProductName FROM" & _
" ProductTypes WHERE LocationsID = " & Me.cboLocations & _
" ORDER BY ProductName"
Me.cboProductTypes = Me.cboProductTypes.ItemData(0)
End Sub