Hi Thanks for that. I did as you say and it came out as Null for type and no results for the others As a beginner I think my problem was trying to get a query that picked where fatherid was null and also where motherid was null. I could not do that. I think I tried to do too much with one line of code but needed to use several lines I have now succeeded in doing what I wanted another way. I have learned from you as the above code will be of great help in the future Many thanks to all who have helped me and I apologise for my shortcomings which caused you all some time Again Thanks Adrian