Occasional error

kirkm

Registered User.
Local time
Tomorrow, 09:51
Joined
Oct 30, 2008
Messages
1,257
Sometimes (maybe once in 10) when I open my DB I'm told

The expression On Open you entered as the event property setting produced the following error: File not found:

All I can do is Ok. Then I close the Form, Open it again and it's fine.

When the error does occur, how can I trap it ? There is nothing in Form Open, Form Load is
DoCmd.Maximize
DoCmd.NavigateTo "acNavigationCategoryObjectType"
DoCmd.Minimize

And Form_Current has On error Goto as first line, but it doesn't pick it up as you'd expect.
 
All I can suggest is to look for whether you have something going on in an opening form. Because normally, NOTHING opens when you open a DB except for the GUI that shows you what structures you have. But there is no user-controllable event there. You have to open a user object to start worrying about events.

I had a similar error recently when I opened a form. I went into my Form_Load event and compiled it and saved it. Did a compact & repair. (Got back may 45 Mb of slack space.) Next time I opened the form it was fat, dumb, and happy time. (For me, not the form...)
 
I did a compact and Repair and twice it brought up the error.
So in Form_Open I put Msgbox "Open" and the next C&R brought up the msgbox then went on to load normally after pressing OK.
Repeated 4 times and Ok every time. So took out the msgbox and ok. Closed and Opened DB - still OK.
Bit of a worry though...
 
If you open from the network, it could be latency.
 
This is Debug-Compile from the toolbar ?
No. But I have deleted the autoexec macro and put the opening Form into Options-Current Database-Display Form and it hasn;t happened since.
But it was an intermittent problem before this.
I was hoping there would be some way to look at what was causing this as/when it happened.
 
Thanks Colin, all completed without any errors. So far so good.
 

Users who are viewing this thread

Back
Top Bottom