First off, welcome to Tek-Tips. Glad to have you aboard!
Second, you will get a much better reply if you post in the correct forum. Try the Access VBA Forms forum (forum702) or another Access forum. This is a VB forum and VB has different syntax than VBA. For example 'DoCmd' does not exist in VB.
When you have time read faq222-2244 for information on how to get the most from these forums.
zemp