Minty
Thanks, but I don't understand what you're doing here. Firstly, what is AIR code?
Secondly can you explain exactly what is going on - it looks like a mixture of some SQL and some VBA added together? Is this something I can run from Access without bothering with a stored procedure, or...