If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Need help regarding VBA

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-08-12, 10:13
fiqnabas fiqnabas is offline
Registered User
 
Join Date: Jan 2012
Posts: 3
Need help regarding VBA

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.
Attached Files
File Type: zip GRS.zip (224.0 KB, 1 views)
Reply With Quote
  #2 (permalink)  
Old 01-08-12, 10:35
Sinndho Sinndho is offline
Registered User
 
Join Date: Mar 2009
Posts: 3,446
In a multi-user environment, you need to split the database according to a Back-end/Front-end schema. You cannot safely work with an Access database in multi-user mode if the interface is shared. Sooner or later , the database becomes corrupted.

One database file (the back-end) contains the tables and remains on the server while each client machine receives a copy of a second database file (the front-end) that contains all other objects (Queries, Forms, Reports, etc.). The front-end uses attached (linked) tables to the back-end.

There's an Assistant (Wizard) is Access to help you slit the database. In Access 2003 you can find it by opening the "Tools" menu, then select "Database Splitter" in the "Database Utilities" submenu. In Access 2010, it's in the "Database Tools" ribbon.
__________________
Have a nice day!
Reply With Quote
  #3 (permalink)  
Old 01-08-12, 22:10
fiqnabas fiqnabas is offline
Registered User
 
Join Date: Jan 2012
Posts: 3
Thanks for your advice, Sinndho.

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.

I seek your advice again. Thank you.
Reply With Quote
  #4 (permalink)  
Old 01-09-12, 04:59
fiqnabas fiqnabas is offline
Registered User
 
Join Date: Jan 2012
Posts: 3
Hi guys,

Thanks for the advice.

I found this link helpful: "http://support.microsoft.com/kb/304932#appliesto"

By the way I read and understand the guidelines but encountered one problem. It seems that the 'Category' table cannot be imported into the back end database as there is an error 'Operation is not supported for this type of object.'Can you help me to take a look at the problem and rectify it if possible?

By the way I did manage to create the front end database without problem. The only thing is upon opening the front end database, it did not load the login interface automatically.

I have attached the front end and back end files for your reference.
I seek your assistance. Thank You.
Attached Files
File Type: zip Databases.zip (514.9 KB, 3 views)
Reply With Quote
  #5 (permalink)  
Old 01-09-12, 13:54
Sinndho Sinndho is offline
Registered User
 
Join Date: Mar 2009
Posts: 3,446
When I use the Database Splitter Assistant for creating a back-end and a front-end from your database, I don't have any problem and no error is reported. The difference could be that I used Access 2010 while you seems to be using the 2007 version. In any case, nothing prevents you from terminating the splitting process manually.
__________________
Have a nice day!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On