Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Quick fix when trying to replace report produces "Name conflicts with existing module, project, or object library" error

479 views
Skip to first unread message

pemigh

unread,
Jul 5, 2016, 12:26:07 PM7/5/16
to
In the last few months I have encountered a couple of problems with the "Name conflicts with existing module, project, or object library" error. One instance resulted in rebuilding a database from a deep backup (had to go back quite a ways to find a copy that did not produce that error), but I found a better solution in the most recent instance.

I was trying to replace a report, and that error kept popping up. The problem persisted even after deleting the report, kind of like there was "ghost code". I discovered, however, that deleting all of the VBA code for the report, and then deleting the report, did the charm: No complaints when I tried importing the new version of the report.

No promises it will help next time the problem shows up, but I'd suggest you put this strategy at the top of your list of things to try.

pemigh

Ron Paii

unread,
Jul 5, 2016, 4:52:23 PM7/5/16
to
Try decompiling your code.

Start Access with the /decompile option then open your database while holding the shift key to disable autostart code. Close Access then reopen normally and compile/save/compact.

this is the shortcut for Access 2016
"C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.EXE" /decompile

pstan...@gmail.com

unread,
Jul 6, 2016, 3:41:44 AM7/6/16
to
Often caused by a control name in your report (MyControlName) being the same as a Dim statement in your VBA (e.g. Dim MyControlName as String)

Phil
0 new messages