Check Tools>References in the vb editor to ensure none are marked missing. Passing the db around from one place to another would likely make some references invalid. IIRC, last time I Googled this error there were all sorts of eventual solutions from various suggestions, meaning it seems to be related to lots of reasons. The main one seems to be that the db is not in a trusted location. The details you provided could be relevant to that situation. To me, the text of the message (assuming there aren't multiple messages depending on the version) suggests you have one or more missing references.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.