These are the source tables from TBL_MATERIALS & TBL_PRODUCTS that I want to combine. The columns should be somewhat dynamic, based on how many rows are in the TBL_MATERIALS.
TBL_MATERIALS
|===============================|
|MATERIAL | Gram |
|-------------------------------|
|Flour-Hard | 25 |
|Flour Soft | 76 |
|Sugar-White | 25 |
|Sugar-Washed | 15 |
|Sugar-Brown | 10 |
|CalciumPropionate | 2.5 |
|SodiumBenzoate | 2 |
|TartarCream | 5 |
|MilkSkimmed | 20 |
|===============================|
TBL_PRODUCTS
|===============================|
|Product | Batch |
|-------------------------------|
|Ameriloaf | 5 |
|Peter Pann | 2.5 |
|Chizmada | 3 |
|Ubemada | 8 |
|Millionaire | 9 |
|Sweet Maria | 2.5 |
|Butter Tarts | 1.25 |
|Caramel Croquette | 4 |
|Garlic Stick | 11 |
|===============================|
This is what I want the table should look like. QUERY_CUSTOM's columns should be dynamic, that when I add a new item on TBL_MATERIALS, a new column for the table below should show. I think we will use something like CREATE TABLE or something. I'm still researching the thing. I hope this will help you understand.
QUERY_CUSTOM
|=================================================================================================|
|Product | Batch | Flour-Hard | Flour-Soft | Sugar-White | Sugar-Washed | etc.etc. |
|-------------------------------------------------------------------------------------------------|
|Ameriloaf | 5 | Gram*Batch | ALL BLANK | | | |
|Peter Pann | 2.5 |ex.25*2.5=75| CELLS | | | |
|Chizmada | 3 | " | SHOULD | | | |
|Ubemada | 8 | " | BE FILLED | | | |
|Millionaire | 9 | " | WITH | | | |
|Sweet Maria | 2.5 | " |[GRAM] | | | |
|Butter Tarts | 1.25 | " | MULTIPLIED | | | |
|Caramel Croquette | 4 | " | BY CORRESP.| | | |
|Garlic Stick | 11 | " |[BATCH] | | | |
|=================================================================================================|