Quote Originally Posted by OBP
Yes, that is great thanks, I have no intention of "removing" the records, just grouping them in to a Report based on what you have just told me.
I will try using IIF() statements first, but if that proves too difficult due to the number of Disability groupings I will use a Query with a VBA Function to assign the code of OB, Disability or TPL to each record.
Then it will just be a case of Grouping them.
That is an interesting approach, i wasnt sure how to do it that way

What about the First rows of the Summary, the Hospital etc, where do they come from?
I havent really thought about a way to do this. I was manually typing it in when doing it in excel.

I fogot to ask, what format is the original data in when you want to Import it and what sort of naming convention do the files have.
The while thing might as well be automated if possible.
These files are coming from different hospitals which use different conventions. The files also have different column headings because they are from different facilities. I have done 3 of these so far and with each one the column headings and filenames have been different.