Rabbie, that's just what I need. I was looking for the function IF, didn't cross my mind that it might be IIF..... I'll give it a try now.
Bob, I think my data is set up as you say, the 2 bits in code I put in my original post are separate tables. Didn't realise you could use IF in queries, I'm...