Below is my current setup, which is based off of the Microsoft access
inventory template. And by grid I do mean data sheet view. When I
select the category for the first product it works fine, and it will
also work if I continue to only add items that are within the same
category, but when I try adding from another category all categories
are switched to the most recently selected category and all products
are removed.
Thank You
Two Combo Boxes
Combo10 - select from categories to narrow product list
ProductID- where product is selected
Row source of Combo10
SELECT [Categories].[CategoryID], [Categories].[CategoryName] FROM
Categories;
AfterUpdate
Private Sub Combo10_AfterUpdate()
Me.ProductID = Null
Me.ProductID.Requery
Me.ProductID = Me.ProductID.ItemData(0)
End Sub
Row source of ProductID
SELECT DISTINCTROW Products.ProductID, Products.ProductName FROM
Products WHERE (([Products]![CategoryID]=[Forms]![Purchase
Orders]![Purchase Orders Subform].[Form]![Combo10]));
Ken Snell (MVP) wrote:
You need to give us details about your exact setup.... what are the
properties of the combo boxes (especially their names, row sources,
etc.)?
What do you mean by "grid" -- is that dataasheet view?
--
Ken Snell
<MS ACCESS MVP>
Thank you for your help. I'm using the combo box from within a grid
that I'm using to create PO's. So when i select the product category
in the second item in the list the selection of the first is reset to
show no product.
Any ideas?
Ken Snell (MVP) wrote:
See this article on the ACCESS Web:
http://www.mvps.org/access/forms/frm0028.htm
--
Ken Snell
<MS ACCESS MVP>
I'm looking to create a combo box with a list of product types say
fruits/vegtables/junk food. After I pick the value I want to be
able
to select any of my products under the product types. So with the
selection of fruit I could select oranges/apples and so on. I
know I
need to do something with the AfterUpdate values but as of yet I
have
been unable to get any macro to work. If possible please point me
to a
file where I could view this in action. (major access newbie)
Thank You