I have inherited some ancients Microsoft Access 2000 database applications and I need to reverse engineer them to support them and develop a replacement. The problem I have is that I can't seem to be able to get the debugger to kick in.
Most of the code in the system is on events such as on FormLoad, ButtonClick etc so this is what I need to be able to debug.
I open the code editor with Alt+F11 and set a breakpoint in, say, the FormLoad for a given form. To make sure this is going to "trigger" I then use the Immediate window to do
?OpenForm("formname")
But my breakpoint gets ignored. I can put a MsgBox in there and it fires and I can use Debug.Print and it will print to the Immediate window - but I can't step through the code. I tried to insert the following in the code as well to see if any of it would trigger the debugger (none of it works):
Debug.Assert False
or
Stop
or
On Error Goto 0
Dim T as Integer
T = 1 /0
That last one just stops executing the code at that point and opens the form - but no joy with the debugger.
I guess that somehow the original developer disabled debugger in the database. Or maybe I am just doing it wrong?
My question is: How do I debug the form events in Microsoft Access 2000? Is there somehing magical I need to do?