Need help regarding VBA

fiqnabas

New member
Local time
Today, 14:26
Joined
Jan 8, 2012
Messages
2
Hi guys,

I need your advice and help. I uploaded my accdb file in a server meant to be used by users across the network. Initially I can run the database but after some time when I opened the database again, it says:

"The VBA modules in this database appear to have been saved with errors. Access can recover the modules, but you should backup the database first. To cancel so you can make a backupcopy of the database, click Cancel. Then make a backup copy of the database.

If you have a backup copy of the database, click OK. When the database opens, examine the modules to see that they are correct. If they are not, you should revert to a recent backup"


I already made a copy of the database after clicking cancel. Then I Clicked "OK" and I get this message:

"The database cannot be opened because the VBA project contained in it cannot be read. The database can be opened only if the VBA project is first deleted. Deleting the VBA project removes all code from modules, forms and reports. You should back up your database before attempting to open the database and delete the VBA project"


What should I do? What may have caused the error?
I have attached the accdb file for your reference and testing.

I appreciate all your help. Thank you.
 

Attachments

Hi guys,

I need your advice and help. I uploaded my accdb file in a server meant to be used by users across the network. Initially I can run the database but after some time when I opened the database again, it says:

"The VBA modules in this database appear to have been saved with errors. Access can recover the modules, but you should backup the database first. To cancel so you can make a backupcopy of the database, click Cancel. Then make a backup copy of the database.

If you have a backup copy of the database, click OK. When the database opens, examine the modules to see that they are correct. If they are not, you should revert to a recent backup"


I already made a copy of the database after clicking cancel. Then I Clicked "OK" and I get this message:

"The database cannot be opened because the VBA project contained in it cannot be read. The database can be opened only if the VBA project is first deleted. Deleting the VBA project removes all code from modules, forms and reports. You should back up your database before attempting to open the database and delete the VBA project"


What should I do? What may have caused the error?
I have attached the accdb file for your reference and testing.

I appreciate all your help. Thank you.

It opened just fine for me. I opened it with a Shift Click to prevent startup and saved it as a new db!

Cheers

Nidge
 
I uploaded my accdb file in a server meant to be used by users across the network.
Explain exactly how users have access to the db.
 
I believed since I'm running the databse in a multi-user environment, I need to split the database according to a Back-end/Front-end schema. I think I cannot safely work with an Access database in multi-user mode if the interface is shared. Sooner or later , the database becomes corrupted.

I'm aware that I can use the database split assistant. However when I tried to split the database using the wizard, there is a prompt :

"The search key was not found in any record."


However the back end file was still created in the designated directory.Thou upon opening the file, there are no tables and blank interface.

This is my first time using the database splitter option. I'm in need of your guidance and advice. Many thanks once again!
 
I believed since I'm running the databse in a multi-user environment, I need to split the database according to a Back-end/Front-end schema.
Correct! You may be experiencing the problem in your OP because the db is not correctly split. Here are some links on manually splitting your db:

http://support.microsoft.com/kb/304932
http://www.fmsinc.com/microsoftaccess/databasesplitter/index.html

I'm aware that I can use the database split assistant. However when I tried to split the database using the wizard, there is a prompt :

"The search key was not found in any record."
It sounds to me that there's some corruption lurking somewhere in your database + you may have spaces in your field or object names. First of all Compact & Repair before trying the Database Splitter. Then read the following if you're still getting that error:

http://www.granite.ab.ca/access/corruptmdbs.htm

Once the error has disappeared you decide whether to perform a manual split or using the in-built tool.
 

"The database cannot be opened because the VBA project contained in it cannot be read. The database can be opened only if the VBA project is first deleted. Deleting the VBA project removes all code from modules, forms and reports. You should back up your database before attempting to open the database and delete the VBA project"[/B]

I've also had major trouble in the past with error using shared access files (before I split into front-end and back-end) when some users had Office 2010 Service Pack 1 and others didn't. If the .accdb was opened and then saved on a computer that had SP1, it would give this exact error message if you subsequently tried to open it on a computer that didn't have SP1.

Just thought I would mention this in case you still run into trouble after splitting.
 

Users who are viewing this thread

Back
Top Bottom