The LOOP syntax is a VBA syntax. There is no loop, by itself, in SQL. In
SQL, you describe the result you want, not HOW to get it.
You cannot transpose a table, in general, since you are limited to 255
fields, and are unlimited, vertically.
You can use a CROSSTAB query to de-normalize the data, supplying then a
'rectangular' view of your data, which is easier to read, for a human
being.
You can use a UNION query to re-normalize the data, from a crosstab, if
required, to get a more acceptable normalized data, easier to do
computation/search/filter.
Vanderghast, Access MVP