In the future you may want to consider the power of pivot tables. It would appear that your application would be greatly simplified