soulprogrammer
MIS
I have a table of "products" where each product belongs to one of 5 categories. The table looks something like this:
Desc. Attr1 Attr2 Category
Prod1 ... ... Cat1
Prod2 ... ... Cat1
Prod3 ... ... Cat1
.
.
.
Prod15 ... ... Cat3
I want to change Attr1 depending on the category. I'm looking to write a code that automates the above process. Something like:
For Each Category In Table "Products"
Select Case Category
Case Cat1
Update myquery...
.
.
.
End Select
Next
Can someone help me with the appropriate object for the For Each... Next statement, or a more efficient method of doing this?
Desc. Attr1 Attr2 Category
Prod1 ... ... Cat1
Prod2 ... ... Cat1
Prod3 ... ... Cat1
.
.
.
Prod15 ... ... Cat3
I want to change Attr1 depending on the category. I'm looking to write a code that automates the above process. Something like:
For Each Category In Table "Products"
Select Case Category
Case Cat1
Update myquery...
.
.
.
End Select
Next
Can someone help me with the appropriate object for the For Each... Next statement, or a more efficient method of doing this?