OnLoad, File not found

DataMinerHome

Registered User.
Local time
Yesterday, 16:56
Joined
Jan 4, 2010
Messages
57
I recently made some minor changes to my db. Now, when I open it, I am getting "The expression onload you entered produced the following error: File not found", with no opportunity to go to a debug window and no clue what is causing this. If I click OK, it goes away and everything seems to work fine.

If I open db by holding down the shift key, I don't get this error. If I then run my autoexec, and open the form I have set as my "open on signon" form, I get no error messages.

Of course I've run repair/compact. I've even gone so far as to do a total rebuild of the db, importing everything into a new, blank db. No help.

DB compiles fine.
This is in Access 2010.


Any ideas???
 
  • Rebuild the changes stepwise from your backup version without the changes
  • Put error handlers in all code
  • Start commenting out code until the error disappears
  • Put debug.print/msgbox here and there, to determine how far you get before the crash
  • Or use a mix of all above

Some of the Onload expression type of error can sometimes be a bit misleading, in that the actual error is something else - some code garbage/object confusion. In such case, what I do is I comment out half of my subs/functions, and if the error goes away, then it must be contained in the half that was commented out. Or else comment out half of the remaning etc...
 
Last edited:
It's just a corrupt form. Rebuild the form (from scratch) and re-hook the event.
 
My "minor change" was that I changed my linked SQL tables to a different server. I went back to my backup copy, re-changed the links there, and now all seems to be well. Go figure.

Spikepl, these are of course all good ideas, and I do have error handling (almost) everywhere.... but the commenting out, etc, is just not practical when you have hundreds and hundreds of lines of code.
 
for the irrelevant sake of an irrelevant discussion :) (and educational purposes for any other readers) what is impractical in commenting a whole bunch of code out in one go? There is a button to do just that: comment out/in an entire selection.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom