G
Guest
I am using the following to filter a combo box (cbocategoryID) filters an
unbound cbo behind txtbox ProductName.
Productname and the unbound are getting their info from ProductsTTL Tbl.
(This is part of the purchaseordersubform based on a query. That combines
ProductsTTL and Order Details) My problem is when I select the item I want it
is not writing the ProductID to the Order Details.ProductID field. And I
don't know how to do it.
Private Sub cboCategoryID_AfterUpdate()
Dim ProductName As String
ProductName = "SELECT [ProductsTTL].[ProductID],
[ProductsTTL].[CategoryID], [ProductsTTL].[ProductName] " & _
"FROM ProductsTTL " & _
"WHERE [CategoryID] = " & Me.cboCategoryID.Value
'"ORDER BY ProductsTTL.ProductName;"
Me.cboProductName.RowSource = ProductName
Me.cboProductName.Requery
End Sub
I have looked at numerous examples and still cannot figure out how to do this.
thanks! in advance
unbound cbo behind txtbox ProductName.
Productname and the unbound are getting their info from ProductsTTL Tbl.
(This is part of the purchaseordersubform based on a query. That combines
ProductsTTL and Order Details) My problem is when I select the item I want it
is not writing the ProductID to the Order Details.ProductID field. And I
don't know how to do it.
Private Sub cboCategoryID_AfterUpdate()
Dim ProductName As String
ProductName = "SELECT [ProductsTTL].[ProductID],
[ProductsTTL].[CategoryID], [ProductsTTL].[ProductName] " & _
"FROM ProductsTTL " & _
"WHERE [CategoryID] = " & Me.cboCategoryID.Value
'"ORDER BY ProductsTTL.ProductName;"
Me.cboProductName.RowSource = ProductName
Me.cboProductName.Requery
End Sub
I have looked at numerous examples and still cannot figure out how to do this.
thanks! in advance