Private Sub Category_AfterUpdate()
Dim strSQL As String
If Len(Trim("" & Category.Value)) > 0 Then
strSQL = "select [Products] from [Inventory Sub Category]"
strSQL = strSQL & " where Category = '" & Trim("" & Category.Value) & "'"
Me![Products].RowSource = strSQL
Me![Products].Requery
End If
End Sub Please remember to give helpful posts the stars they deserve!
This makes the post more visible to others in need!
Yah, except that you don't need to explicitly requery the combo box, as that will happen when you update the rowsource. I _think_ that requerying will make it happen twice. Not a huge deal, but some combobox rowsources are complex enough that it's probably best to avoid that.
Jeremy =============
Jeremy Wallace
Designing, Developing, and Deploying Access Databases Since 1995
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.