Well, that's a very poor way of managing a database. I have provided you the code that will work in a proper database.Thanks vbaInet .. May I ask again, For my other DB the StudentID changes every year.. StudentID for one student: for this year when he/she was first Year = 111111,and will change the next 3 years for Second, Third and Fourth = 121111,131111,141111...
You can always edit the query and add the parameters that will prompt you for the names.