Hello,
I am new at creating Loops in Access. I want create a new column for each new occurrence of a ID using a loop. If there is a better way to accomplish this I am open to ideas.
Below is what I want to accomplish.
Table A
[TABLE="width: 500"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Exception Id[/TD]
[TD]Exception Date[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]55576[/TD]
[TD]7/4/19[/TD]
[/TR]
[TR]
[TD]XYZ[/TD]
[TD]32797[/TD]
[TD]6/8/19[/TD]
[/TR]
[TR]
[TD]OPQ[/TD]
[TD]86290[/TD]
[TD]4/2/19[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]75479[/TD]
[TD]12/6/19[/TD]
[/TR]
[TR]
[TD]XYZ[/TD]
[TD]57580[/TD]
[TD]1/18/19[/TD]
[/TR]
[TR]
[TD]XYZ[/TD]
[TD]17083[/TD]
[TD]5/9/20[/TD]
[/TR]
</tbody>[/TABLE]
Output Table
[TABLE="width: 500"]
<tbody>[TR]
[TD]ID[/TD]
[TD]EXC1[/TD]
[TD]EXC2[/TD]
[TD]EX3[/TD]
[TD]EXC_DT1[/TD]
[TD]EXC_DT2[/TD]
[TD]EXC_DT3[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]55576[/TD]
[TD]75479[/TD]
[TD][/TD]
[TD]7/4/19[/TD]
[TD]12/6/19[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]OPQ[/TD]
[TD]86290[/TD]
[TD][/TD]
[TD][/TD]
[TD]4/2/19[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]XYZ[/TD]
[TD]32797[/TD]
[TD]57580[/TD]
[TD]17083[/TD]
[TD]6/8/19[/TD]
[TD]1/18/19[/TD]
[TD]5/9/20[/TD]
[/TR]
</tbody>[/TABLE]
I am new at creating Loops in Access. I want create a new column for each new occurrence of a ID using a loop. If there is a better way to accomplish this I am open to ideas.
Below is what I want to accomplish.
Table A
[TABLE="width: 500"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Exception Id[/TD]
[TD]Exception Date[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]55576[/TD]
[TD]7/4/19[/TD]
[/TR]
[TR]
[TD]XYZ[/TD]
[TD]32797[/TD]
[TD]6/8/19[/TD]
[/TR]
[TR]
[TD]OPQ[/TD]
[TD]86290[/TD]
[TD]4/2/19[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]75479[/TD]
[TD]12/6/19[/TD]
[/TR]
[TR]
[TD]XYZ[/TD]
[TD]57580[/TD]
[TD]1/18/19[/TD]
[/TR]
[TR]
[TD]XYZ[/TD]
[TD]17083[/TD]
[TD]5/9/20[/TD]
[/TR]
</tbody>[/TABLE]
Output Table
[TABLE="width: 500"]
<tbody>[TR]
[TD]ID[/TD]
[TD]EXC1[/TD]
[TD]EXC2[/TD]
[TD]EX3[/TD]
[TD]EXC_DT1[/TD]
[TD]EXC_DT2[/TD]
[TD]EXC_DT3[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]55576[/TD]
[TD]75479[/TD]
[TD][/TD]
[TD]7/4/19[/TD]
[TD]12/6/19[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]OPQ[/TD]
[TD]86290[/TD]
[TD][/TD]
[TD][/TD]
[TD]4/2/19[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]XYZ[/TD]
[TD]32797[/TD]
[TD]57580[/TD]
[TD]17083[/TD]
[TD]6/8/19[/TD]
[TD]1/18/19[/TD]
[TD]5/9/20[/TD]
[/TR]
</tbody>[/TABLE]