how can i auto populate a column with values from another table based on the value from a drop down list as a reference to the table.
So based on the value/company i select from the drop down list it should auto populate the corresponding product qtys from table 2
[TABLE="width: 500"]
<tbody>[TR]
[TD]Company 1[/TD]
[/TR]
[TR]
[TD]10[/TD]
[/TR]
[TR]
[TD]45[/TD]
[/TR]
[TR]
[TD]5[/TD]
[/TR]
[TR]
[TD]6[/TD]
[/TR]
[TR]
[TD]6[/TD]
[/TR]
[TR]
[TD]23[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Company 1[/TD]
[TD]Company 2[/TD]
[TD]Company 3[/TD]
[TD]Company 4[/TD]
[TD]Company 5[/TD]
[TD]Company 6[/TD]
[TD]Company 7[/TD]
[/TR]
[TR]
[TD]Product 1[/TD]
[TD]10[/TD]
[TD]4[/TD]
[TD]3[/TD]
[TD]6[/TD]
[TD]4[/TD]
[TD]0[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Product 3[/TD]
[TD]45[/TD]
[TD]4[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]7[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]Product 4[/TD]
[TD]5[/TD]
[TD]3[/TD]
[TD]3[/TD]
[TD]5[/TD]
[TD]5[/TD]
[TD]5[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Product 5[/TD]
[TD]6[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]6[/TD]
[TD]33[/TD]
[TD]76[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]Product6[/TD]
[TD]6[/TD]
[TD]32[/TD]
[TD]7[/TD]
[TD]6[/TD]
[TD]7[/TD]
[TD]44[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Product 7[/TD]
[TD]23[/TD]
[TD]23[/TD]
[TD][/TD]
[TD]7[/TD]
[TD]23[/TD]
[TD]4[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]
So based on the value/company i select from the drop down list it should auto populate the corresponding product qtys from table 2
[TABLE="width: 500"]
<tbody>[TR]
[TD]Company 1[/TD]
[/TR]
[TR]
[TD]10[/TD]
[/TR]
[TR]
[TD]45[/TD]
[/TR]
[TR]
[TD]5[/TD]
[/TR]
[TR]
[TD]6[/TD]
[/TR]
[TR]
[TD]6[/TD]
[/TR]
[TR]
[TD]23[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Company 1[/TD]
[TD]Company 2[/TD]
[TD]Company 3[/TD]
[TD]Company 4[/TD]
[TD]Company 5[/TD]
[TD]Company 6[/TD]
[TD]Company 7[/TD]
[/TR]
[TR]
[TD]Product 1[/TD]
[TD]10[/TD]
[TD]4[/TD]
[TD]3[/TD]
[TD]6[/TD]
[TD]4[/TD]
[TD]0[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Product 3[/TD]
[TD]45[/TD]
[TD]4[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]7[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]Product 4[/TD]
[TD]5[/TD]
[TD]3[/TD]
[TD]3[/TD]
[TD]5[/TD]
[TD]5[/TD]
[TD]5[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Product 5[/TD]
[TD]6[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]6[/TD]
[TD]33[/TD]
[TD]76[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]Product6[/TD]
[TD]6[/TD]
[TD]32[/TD]
[TD]7[/TD]
[TD]6[/TD]
[TD]7[/TD]
[TD]44[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Product 7[/TD]
[TD]23[/TD]
[TD]23[/TD]
[TD][/TD]
[TD]7[/TD]
[TD]23[/TD]
[TD]4[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]
Last edited: