Permission Denied from Switchboard

gschimek

Registered User.
Local time
Today, 07:14
Joined
Oct 2, 2006
Messages
102
I have a line of code that I'm trying to use to back up my backend database.
Code:
FileCopy CurrentProject.path & "\Tracking_be.mdb", CurrentProject.path & "\Backup\Tracking_be_backup.mdb"

If I attach that code to a command button, it works great. If I attach it to the Form_Open event of a form, it works great. If I put it in a function and call it from a macro, it works great, too.

But if I set a Switchboard option to call the function, open the form, or run the macro, I get an error: Run time error 70. Permission Denied.

I can't seem to find anything about this in the forums. I know it's because the backend is in use at the time, because if I change the code to copy some other random file instead of the backend, it works fine.

So what can I do to free up the backend so that the function works from the Switchboard?
 

Users who are viewing this thread

Back
Top Bottom