i need to compare to elements in different tables in order to create product code. For example: if the product type is toy and material is metal it would be 1, tool & plastic 2. material and product type in differnet tables. Anybody who can help me out.