I had this problem starting last week in a database I use to track online entries.
Any action button would create this this error.
If I went in to Design Mode - selected one of the buttons and then opened the code - returned to Form View - and it would work.
If I closed the database and re-opened it the error would return.
Then I remembered that I had deleted a Button - which I must have created - had a default name - and maybe opened a code window - but had never put in code in it.
So I went into the code and sure enough there was cmdButton39 or something like that code section.
Had the header and of course End Sub - but no code in between.
So I deleted that code section and that has corrected the problem.
I do not remember getting an error when I deleted the button.