The reason for this was a code module I had removed before closing the database. After reopening the name still existed in the list, but no code popped up when I clicked it. Neither Repair&Compact nor /decompile helped.

Luckily I had a very recent backup and decided to revert to this one.

***

Strange: For this post I wanted to test whether it might be possible to import code from a .bas-file with the name of the broken module. So I reactivated the .accdb not working yesterday. Magically it the error had gone! The module with the removed code was still existing. When I clicked it, the code window popped up and was just empty... Even if this works now I discarded this copy as I think it still might be inconsistent.This post has been edited by doctor9: Aug 30 2017, 08:22 AM

Only just noticed this post.Problems of this kind can be due to errors in the hidden system MSysObjects table.For good reasons, you can't edit it directly but there are ways of fixing corruption in that table.