Attention: Any advice I give is based on Access 2003 as that is what I use. Any changes to Access since then are unknown to me!
Please take any code I post as examples, not code to immediately copy & paste into your own. I take no responsibility for errors/issues caused by using my code without checking / modifying to suit your database.