Dear Premy and Chris,
Thanks for your comments.
Premy, thank you for the idea. I supposed I should do a one-to-many relationship. Will look into it.
Chris, very informative link and your code works well. Actually I would like the code to be automatically fill in the code field as well. Any...