I am trying to create a query using the Design function of the Make query, but I am running into difficulties. I am trying to put a piece of VB code in the field, but I keep receiving errors or wrong data. The field name I am trying to create is Origin Group. Within this field, I would like to cross-reference a table and only return values that match. The problem is that it has to match in different combinations.
Source Table: FLORENCE_MATERIALS
Cross Reference Table: X-REF VENDORS
Reference Fields: Primary Vendor, Vendor Number, Account Group
Situation is as follows....
Origin Group = if primary vendor (in florence_materials table)= Vendor Number (in X-Ref Table)but only return the value of 300 if account group field (in X-ref table) = 7520. Within the same field should be another possible if statement...If primary vendor (in florence_materials table) = Vendor Number (in X-ref table) but only return the value of 100 if account group field (in X-ref table) = 7510.
PLEASE HELP!!! I am obviously over my head and need some help.
Please let me know if you have any questions
Source Table: FLORENCE_MATERIALS
Cross Reference Table: X-REF VENDORS
Reference Fields: Primary Vendor, Vendor Number, Account Group
Situation is as follows....
Origin Group = if primary vendor (in florence_materials table)= Vendor Number (in X-Ref Table)but only return the value of 300 if account group field (in X-ref table) = 7520. Within the same field should be another possible if statement...If primary vendor (in florence_materials table) = Vendor Number (in X-ref table) but only return the value of 100 if account group field (in X-ref table) = 7510.
PLEASE HELP!!! I am obviously over my head and need some help.
Please let me know if you have any questions