Error on startup due to 'Display Form'

AlexG

New member
Local time
Today, 14:11
Joined
Aug 9, 2013
Messages
2
Hi

I have been building a new db in my personal drive at work which has been working perfectly, until I transfer it to the main network drive so that others can use it.

When I try to open it, I now get an error saying that windows cannot access the file (code 0x80070002) - although it does in fact open it anway, eventually.

I have removed and re-instated various bits of code, and discovered that it's linked to the 'Display Form' function within Access Options > Current Database, that I have used to open the form 'Homepage' when the db is opened. When the dropdown is set to 'None', the db opens fine, but when a form is selected, the error occurs. I have tried using an AutoExec macro to open the Homepage form, but this generates the same error too.

Any ideas how I can fix this?
 
Hello AlexG, Welcome to AWF.. :)

Does that indicate there is something wrong with the Homepage form? Try checking for the events associated with the Form, like Form Open, Form On Load, Form Activate, Form Current.. It should shed some evidence..

Did you try Compiling your code?
 
Hi, thanks for your reply. It's a very simple landing page with our corporate colours in the form header and then 4 buttons that take you off to other parts of the database. There aren't any events on the form -there was a DoCmd.ShowToolbar event to hide the ribbon, but I removed that and it didn't help.

I'm fairly new to Access so not sure what compiling code is.
 
It is very hard to track down the problem with this.. Perform a Compact & Repair.. See if that helps..

To Compile: Go to the VBA window (Alt+F11) then under Debug menu select Compile.. It will pop up any errors that your code might have..
 
I would say that it is probably permissions on the network drive, because you will need full permissions on the folder that it is being run from. Check with your IT department.

Also if others are going to be using the database, you should seriously consider splitting into front-end and back-end.
 

Users who are viewing this thread

Back
Top Bottom