If this works sometimes, then I believe you are experiencing the same situation as many others where something wonky causes this error to be raised, which really has nothing to do with security and trusted locations. When you think about it, it is either trusted or not, and code should work or not. Some code working sometimes makes no sense from a trust perspective. These statements
"...all functions and macros ran properly and completed the task. But at the end, I still got 2950 error....mdb failed as before, but .accdb worked fine. However after the completion the 2950 error still popped up." are confusing. I'm not sure which works when or what.
I was able to initiate the functions independently in the module by using the [Step Into F8] and [Step out] tools, but this option no longer works
This should still work. There seems to be enough going on here that your best bet might be to post a zipped copy of your db for investigation. From what I've read on this, the issue could be an invalid reference to a custom toolbar/menu bar or invalid reference. I am still using W7 and 2007, so I would be able to keep those variables the same. If not, check those 2 things. Another thing to try is create a form, assign the code to its open event and see what happens.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.