I have a section of VBA code in MS-Access, that for reasons I don't understand, stops the execution of the code and leaves the user looking at a yellow highlighted line of code in the VBE. The code looks like the following:
On Error Resume Next
Set MyForm = Forms("MyForm")
LastError = Err ' <=== Stops HERE
If LastError <> 0 Then
... blah, blah, blah
I am using the error condition to find out if the form "My Form" is opened.
At first, I had "Stop on All Errors" checked. When I was done debugging, I switched to "Stop on UnHandled Errors". The code worked fine for several weeks. Now it stops at the point indicated. When I check the value of Err (Immediate Window: ?Err.Number), I get zero.
I am baffled as to why this is happening. Does anyone have any ideas?

--- Tom
--- Tom