The generic version of error 2046 is
The command or action '|1' isn't available now.@* You may be in a read-only database or an unconverted database from an earlier version of Microsoft Access. * The type of object the action applies to isn't currently selected or isn't in the active view.@Use
only those commands and macro actions that are currently available for this database.@1@@@1
Your error message will be more specific.
You need to go through the code and set break points to determine which line of code triggers the error.
Once you have done that, report back with further details of the code and where the error occurs so someone can assist you.