473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Corrupt VBA project in the database

Dear reader,

I can't repair this with Tools>>Database utilities>>Compact and repair
database....

And another way around: after creating a new database and start import all
object the same message appears:

"Visual Basic for applications project in the database is
corrupt."

Is there any other solution to solve this problem?

Thanks for any help.

Kind regards,

Simon van Beek
Jan 9 '06 #1
2 8653
At what point do you receive this message? Immediately you start to import?
When it gets to a particular form during the import process?

I would expect you could import your tables and queries into the new
database. If a particular form fails, try importing all the others. There
may be 2 or 3 forms/reports that will fail, but you have all the others.

Decompile a copy of the database by entering something like this at the
command prompt while Access is not running. It is all one line, and include
the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"
Then compact:
Tools | Database Utilites | Compact

Another option would be to export the form to a text file, e.g.:
SaveAsText acForm, "Form1", "C:\Form1.txt"
If that works, you will probably be able to import it into the new database
with:
LoadFromText acForm, "Form1", "C:\Form1.txt"

If you are actually able to open the bad form in design view anyway, another
option would be to copy all the text from its code window out to notepad.
Then set the form's HasModule property to No. Save. Close it. Compact the
database. Try importing the form. If it works, you can then paste in the
text into its code window from notepad.

For other general suggestions on handling database corruptions see:
Recovering from Corruption
at:
http://allenbrowne.com/ser-47.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Simon" <S.*******@HCCnet.nl> wrote in message
news:43*********************@textreader.nntp.hccne t.nl...
Dear reader,

I can't repair this with Tools>>Database utilities>>Compact and repair
database....

And another way around: after creating a new database and start import
all
object the same message appears:

"Visual Basic for applications project in the database is
corrupt."

Is there any other solution to solve this problem?

Thanks for any help.

Kind regards,

Simon van Beek

Jan 9 '06 #2
In message <43*********************@textreader.nntp.hccnet.nl >, Simon
<S.*******@HCCnet.nl> writes
"Visual Basic for applications project in the database is
corrupt."


I've seen that error message when importing forms. The problem was that
one of the forms was linked to a query that had been deleted from the
database. When I fixed that problem the import worked.

--
Bernard Peek
London, UK. DBA, Manager, Trainer & Author.

Jan 9 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Nick Stansbury | last post by:
Hi, Access 2003. Running over terminal server on a Windows Server 2003 box. The error occurs on every machine that I've tried copying the file to. Latest Jet SP & Office SP. Database hasn't been...
4
by: Harris | last post by:
Can anyone please help? I have read the postings on the error "The Visual Basic for Applications Project in the database is corrupt" but none report the particular problem I am experiencing, i.e.,...
9
by: Bungle | last post by:
Hi There, Does anybody know where i might be able to locate a tool/application that can determine whether a Database is corrupt?? Also, can a bad network connection cause a corruption to a...
2
by: Tomas Vera | last post by:
Hello All (This is being cross-posted to the C++ group), I've started receiving the subject message during a compile of a C++ based interface module used in my C# based WebApp. This module...
0
by: Tomas Vera | last post by:
Hello All (This is being cross-posted to the C# group), I've started receiving the subject message during a compile of a C++ based interface module used in my C# based WebApp. This module exposes...
17
by: shineofleo | last post by:
Here is the situation: I wrote a VB programm, which stores all the information in a single Access database file using jet engine. It worked well, however one of my customs reported that there was...
2
by: wevans | last post by:
I designed a db in Access 07 and opened it up once in Access 2003. No when I open it up in 07 again I get this message... "The database cannot be opened because the VBA project contained in it...
1
by: ianoble | last post by:
Hi all, I am running a simple command line Get for a networked VSS database. The command executes properly until it reaches a directory that is corrupted. Because the database is not local, I...
8
by: iheartvba | last post by:
Hi this is a query made using access query builder: SELECT tblBank.BankID, Now() AS TimeRecd, Val(Right(nz(,0),3)) AS ConsID, "AutoCASH" AS RecUser, tblBank.Dt, Forms!frmRecCASHRunningBal!tbGroup...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.