The following function is throwing an error when the database throws any error upon opening: VBE.ActiveCodePane.CodeModule The rest of the time, it works fine. This only breaks when the first thing I try to do produces an error. Any idea why? Susan Harkins