KenReay,
Thanks for the input, this is giving me exactly what I was looking for. However, I thought I would be able to transpose the table, like with excel. Do you know how to take the records produced by this and turn them into field headings.
Thanks