Application project in the database is corupt!

G

glctesta

Hi,
I get this message, every time I run the debugger into what ever module in my
Access 2003 program:

"The changes you have requested to the table where not successful because
they would create duplicate values in the index, primary key, or relationship.
Change the data in the field that contain duplicate data, remove the index to
permit duplicate entries and try again."

and after that I'm not able to launch my program any more.
If I try to open a Module I get this message:

"The Visual Basic for Application project in the database is corrupt"

No way to try to campact and repair, doesn't work!

Some one can help me?
I did not make main modification on my program, just little changes...
Please...!!
 
T

Tom van Stiphout

Don't panic.
These two issues are likely unrelated, although corruption can do
funny things.
If you suspect corruption, deal with that first:
http://www.granite.ab.ca/access/corruptmdbs.htm

You can export your code to text files using the officially
undocumented SaveAsText method.

-Tom.
Microsoft Access MVP
 
G

glctesta

Hi Tom,
thank you for your message.
I cannot understand, but I just import all the data, query, module etc, into
a new empty MDB.
Now it's working, but I got a new error. Doesn't recognize a propriety like:

Function AddAppProperty(strName As String, varType As Variant, varValue As
Variant) As Integer
Dim DBS As Database, prp As Property
Const conPropNotFoundError = 3270

Set DBS = CurrentDb
On Error GoTo AddProp_Err

DBS.Properties(strName) = varValue <----- the parameter is "AppTitle"
which worked perfectly until I've imported all into a new database on the
same pc.!!

AddAppProperty = True
....

Thanks for your advices.

Glctesta
Don't panic.
These two issues are likely unrelated, although corruption can do
funny things.
If you suspect corruption, deal with that first:
http://www.granite.ab.ca/access/corruptmdbs.htm

You can export your code to text files using the officially
undocumented SaveAsText method.

-Tom.
Microsoft Access MVP
Hi,
I get this message, every time I run the debugger into what ever module in my
[quoted text clipped - 15 lines]
I did not make main modification on my program, just little changes...
Please...!!
 
P

PieterLinden via AccessMonster.com

these are all symptoms of not having the DAO library loaded. Open a code
module, then go to Tools, References and make sure DAO is checked. Then try
compiling.
 
T

Tom van Stiphout

On Wed, 02 Dec 2009 17:40:11 GMT, "PieterLinden via AccessMonster.com"

In addition to what Pieter said: it is HIGHLY recommended to
disambiguate your data types. So rather than:
dim db as database
dim rs as recordset
you should write:
dim db as dao.database
dim rs as dao.recordset 'or adodb.recordset as the case may be.

-Tom.
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top