Solved Cascading combo box - Sorting filtered results (1 Viewer)

mishash

Member
Local time
Today, 07:04
Joined
Aug 20, 2020
Messages
52
Can't find the correct syntax to make it work. Please help.

Private Sub cboBrand_AfterUpdate()
Me.cboProductID.RowSource = "SELECT ProductID, ProductName, ProductNumber FROM tblProduct WHERE BrandID = " & Me.cboBrand ORDER BY ProductName
End Sub
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:04
Joined
Oct 29, 2018
Messages
21,494
Try:
Code:
Me.cboProductID.RowSource = "SELECT ProductID, ProductName, ProductNumber FROM tblProduct WHERE BrandID = " & Me.cboBrand & " ORDER BY ProductName"
 

mishash

Member
Local time
Today, 07:04
Joined
Aug 20, 2020
Messages
52
Try:
Code:
Me.cboProductID.RowSource = "SELECT ProductID, ProductName, ProductNumber FROM tblProduct WHERE BrandID = " & Me.cboBrand & " ORDER BY ProductName"
Thank you very much!
 

Users who are viewing this thread

Top Bottom