gstreichan
Registered User.
- Local time
- Today, 21:56
- Joined
- Apr 1, 2014
- Messages
- 34
Dear Experts, I am hoping for a solution on this. I have been trying to get a help with GPT and still cannot as well. Please see explanation below:
In MS Access file attached MaterialAttr table I have the following field names and their descriptions:
Position: It is the sorting order the other fields should be worked out;
MAIN_DESCRIPTION: It is the main description of material;
MAIN_DESCRIPTION_CODE: It is the code of MAIN_DESCRIPTION. To be the first part of material code (Material Code = MAIN_DESCRIPTION_CODE & ATTR_CODES);
ATTR_LABEL: It is the label of ATTR_DESC, what actually the ATTR_DESC refers to in the material part;
ATTR_DESC: It is the attribute description, to be placed after a “, “ of MAIN_DESCRIPTION, in other words a continuation of MAIN_DESCRIPTION. Please note 1 MAIN_DESCRIPTION may have one or more ATTR_DESC_CODE: It is the code of ATTR_DESC and shall be placed in addition to MAIN_DESCRIPTION_CODE, no space, just added in on right side of MAIN_DESCRIPTION_CODE.
Explaining the above, now I just need to give you some additional information. The intent of this query is to create a table that will combine sorted by Position, all the possible MAIN_DESCRIPTION &”, “& ATTR_DESC and all the MAIN_DESCRIPTION_CODE & ATTR_DESC_CODE. Please keep in mind, 1 MAIN_DESCRIPTION may have 1 or multiple ATTR_LABEL then it should combine all possible descriptions and codes. One example below (this case MAIN_DESCRIPTION has 2 ATTR_LABEL only but a different main description can have 5, 6, 7, etc:
MAIN_DESCRIPTION: PIPE which has MAIN_DESCRIPTION_CODE: PP
ATTR_LABEL: SIZE, which has:
ATTR_DESC: 1, which has ATTR_DESC_CODE: A
ATTR_DESC: 2, which has ATTR_DESC_CODE: B
ATTR_DESC: 3, which has ATTR_DESC_CODE: C
ATTR_LABEL: THICKNESS, which has:
ATTR_DESC: STD, which has ATTR_DESC_CODE: T1
ATTR_DESC: XL, which has ATTR_DESC_CODE: T2
ATTR_DESC: XLS, which has ATTR_DESC_CODE: T3
Then all results on table should be:
Material_Description: PIPE, 1, STD with Material_Code: PPAT1
Material_Description: PIPE, 1, XL with Material_Code: PPAT2
Material_Description: PIPE, 1, XLS with Material_Code: PPAT3
Material_Description: PIPE, 2, STD with Material_Code: PPBT1
Material_Description: PIPE, 2, XL with Material_Code: PPBT2
Material_Description: PIPE, 2, XLS with Material_Code: PPBT3
Material_Description: PIPE, 3, STD with Material_Code: PPCT1
Material_Description: PIPE, 3, XL with Material_Code: PPCT2
Material_Description: PIPE, 3, XLS with Material_Code: PPCT3
Material_Description and Material_Code is to be referred side by side in separate columns. Whenever a MAIN_DESCRIPTION has more than one ATTR_LABEL, then descriptions should be combined always and not only 1 ATTR_LABEL selected with its code.
Can you help me with a VBA for a query in access that will create such result? I am really exhausted on this, and I am not finding any solution.
This would be tremendous if someone can help.
In MS Access file attached MaterialAttr table I have the following field names and their descriptions:
Position: It is the sorting order the other fields should be worked out;
MAIN_DESCRIPTION: It is the main description of material;
MAIN_DESCRIPTION_CODE: It is the code of MAIN_DESCRIPTION. To be the first part of material code (Material Code = MAIN_DESCRIPTION_CODE & ATTR_CODES);
ATTR_LABEL: It is the label of ATTR_DESC, what actually the ATTR_DESC refers to in the material part;
ATTR_DESC: It is the attribute description, to be placed after a “, “ of MAIN_DESCRIPTION, in other words a continuation of MAIN_DESCRIPTION. Please note 1 MAIN_DESCRIPTION may have one or more ATTR_DESC_CODE: It is the code of ATTR_DESC and shall be placed in addition to MAIN_DESCRIPTION_CODE, no space, just added in on right side of MAIN_DESCRIPTION_CODE.
Explaining the above, now I just need to give you some additional information. The intent of this query is to create a table that will combine sorted by Position, all the possible MAIN_DESCRIPTION &”, “& ATTR_DESC and all the MAIN_DESCRIPTION_CODE & ATTR_DESC_CODE. Please keep in mind, 1 MAIN_DESCRIPTION may have 1 or multiple ATTR_LABEL then it should combine all possible descriptions and codes. One example below (this case MAIN_DESCRIPTION has 2 ATTR_LABEL only but a different main description can have 5, 6, 7, etc:
MAIN_DESCRIPTION: PIPE which has MAIN_DESCRIPTION_CODE: PP
ATTR_LABEL: SIZE, which has:
ATTR_DESC: 1, which has ATTR_DESC_CODE: A
ATTR_DESC: 2, which has ATTR_DESC_CODE: B
ATTR_DESC: 3, which has ATTR_DESC_CODE: C
ATTR_LABEL: THICKNESS, which has:
ATTR_DESC: STD, which has ATTR_DESC_CODE: T1
ATTR_DESC: XL, which has ATTR_DESC_CODE: T2
ATTR_DESC: XLS, which has ATTR_DESC_CODE: T3
Then all results on table should be:
Material_Description: PIPE, 1, STD with Material_Code: PPAT1
Material_Description: PIPE, 1, XL with Material_Code: PPAT2
Material_Description: PIPE, 1, XLS with Material_Code: PPAT3
Material_Description: PIPE, 2, STD with Material_Code: PPBT1
Material_Description: PIPE, 2, XL with Material_Code: PPBT2
Material_Description: PIPE, 2, XLS with Material_Code: PPBT3
Material_Description: PIPE, 3, STD with Material_Code: PPCT1
Material_Description: PIPE, 3, XL with Material_Code: PPCT2
Material_Description: PIPE, 3, XLS with Material_Code: PPCT3
Material_Description and Material_Code is to be referred side by side in separate columns. Whenever a MAIN_DESCRIPTION has more than one ATTR_LABEL, then descriptions should be combined always and not only 1 ATTR_LABEL selected with its code.
Can you help me with a VBA for a query in access that will create such result? I am really exhausted on this, and I am not finding any solution.
This would be tremendous if someone can help.