"File Not Found" error on opening db (1 Viewer)

ontopofmalvern

Registered User.
Local time
Today, 21:41
Joined
Mar 24, 2017
Messages
64
Hi

I have a project I use most days, I haven't made significant changes to it in a while but today it's gone odd. On launching while it opens the main form it gives the error "File Not Found" and goes into debugging mode and the main forms code window opens. However, no line of executing code is highlighted. If I reset the code the form opens fine but is more or less unusable as I keep getting the same error if I use a control. I have tried a compact and repair; no change. I put a breakpoint in the first line of the onLoad event but the error occurs before it gets there. Oddly if change the db options so no form opens on launch it works absolutely fine I just need to manually launch the main form which opens and runs without issue.

I make very regular back-ups and yesterday evening's version works fine, I cannot remember making any changes since other than a textual changes to a report that is not connected to the main form or db launch.

Not mission critical but annoying and odd…

Any ideas

Tah

Richard
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 21:41
Joined
Sep 12, 2006
Messages
15,659
There might be a minor corruption. I would copy the database first, then try a compact and repair. If that still errors, try importing everything into a new database. If it worked before it ought to be working now
 

JMongi

Active member
Local time
Today, 16:41
Joined
Jan 6, 2021
Messages
802
Definitely sounds like corruption. Had that happen to me as well. One day the whole thing just didn't work right. Using a slightly older version and nuking the offending version and have never had (that) problem since.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 15:41
Joined
Feb 28, 2001
Messages
27,200
While I agree with the possibility of corruption, there are a couple of other issues to consider. Since you get to open the DB in debug mode, you can flit around inside it to check things. I would check for several possibilities.

If you checked for code that might be running, that implies you have either general or class modules to consider. Open the VBA window and check Tools >> References to see if any of your references is in some way either highlighted or marked as "Missing" or "Broken" - and I've seen both at different times.

If this is a split DB, look at each linked table - one table at a time - to verify that you can open it. Particularly if you are using an Excel spreadsheet as a linked table, verify its continued presence.

If you open some other app behind the scenes, e.g. Outlook, see if that app is still working.

And finally, get to the Windows Update page. Use the "History" option to see if you have recently suffered a non-reboot update.

If ALL of these tests come up negative, that points a lot more forcefully towards corruption.

As a way to get rid of corruption before the "nuclear" option, consider a decompile/recompile sequence. Read the link below. Note that several headings are presented in the linked article, but they DO go into details of how to do this.

 

JMongi

Active member
Local time
Today, 16:41
Joined
Jan 6, 2021
Messages
802
@The_Doc_Man is definitely making a more sensible suggestion than I.

I should have clarified that my "nuked" database was simple and in early development. A more robust and aged database would be potentially harder to just nuke completely even with backups. A more measured approach is definitely safer.
 

ontopofmalvern

Registered User.
Local time
Today, 21:41
Joined
Mar 24, 2017
Messages
64
Okay, many thanks for the advice. In this case, by far the simplest solution is to roll back to the last working version which I have been using today no bother - so the cause will remain a mystery. The database is split and issues were all with the front end so no data loss just an odd tweak to a report or two. I tend to back up FE and BE each day (like most people I learnt the hard way the merits of that).
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 15:41
Joined
Feb 28, 2001
Messages
27,200
If you have a usable backup of the FE, that is a reasonable approach, particularly if the problem was fixed by rolling back the FE only. However, watch for it to happen again. If it does, you have a more serious problem.
 

Users who are viewing this thread

Top Bottom