I have a strange problem with Access 2007 which I cant figure out in the design mode. I have form2 which uses a field field1 in form1 in its load event using the notation
field2 = Forms!start!field1.
But in run mode when I close the application when form2 is in focus, the execution runs through the form load event of form2 and causes the following error:
can't find the form 'form1' referred to in a macro expression or Visual Basic code.
The error occurs because when the application is closed form1 closes first, making its field1 unavailable for form2, but why the execution runs through the load event of form2, that too only when form2 is in focus? I managed a work around by checking if form1 is open in form2 load event, but it is disturbing to see execution running through unintended path.
I have also discovered that even within the load event of form1 execution extends only upto this accessing of field2 and not thereafter, when the application is closed!!!
Can any one throw some light in this regard? Thanks in advance.