R
Ron
I have products table (tblProducts) which have 2 columns:
Product,ProductCategory
The form has 2 fields: Product, ProductCategory
I want to automaticly fill the Category field after choosing the product.
I have this:
Private Sub Product_AfterUpdate()
Dim Cat As String
Cat = DLookup("Category", "tblProducts", [Product] = Me.Product.Value)
Me.Category = Cat
End Sub
no matter which product I choose, I get the same Category.
Can someone can tell me what's wrong?
Thanks,
Ron
Product,ProductCategory
The form has 2 fields: Product, ProductCategory
I want to automaticly fill the Category field after choosing the product.
I have this:
Private Sub Product_AfterUpdate()
Dim Cat As String
Cat = DLookup("Category", "tblProducts", [Product] = Me.Product.Value)
Me.Category = Cat
End Sub
no matter which product I choose, I get the same Category.
Can someone can tell me what's wrong?
Thanks,
Ron