Access Closes Unexpectantly

  • Thread starter Thread starter John Speed
  • Start date Start date
J

John Speed

I have been designing a database for a few months now and not had any
problems, however this week when i am using the database access keeps
crashing. I have run the database on a different machine and it works fine
and i have also repaired my office installation and i am still having
problems. The problem seems to occure when i try to move records or use any
button on any of the forms. I have tried working in debug mode to see if it
is a particular line of code which is causing this however in debug mode the
system does not crash.

Any ideas?

John Speed
 
I have been designing a database for a few months now and not had any
problems, however this week when i am using the database access keeps
crashing. I have run the database on a different machine and it works fine
and i have also repaired my office installation and i am still having
problems. The problem seems to occure when i try to move records or use any
button on any of the forms. I have tried working in debug mode to see if it
is a particular line of code which is causing this however in debug mode the
system does not crash.

Any ideas?

John Speed

John,
That sounds like you have some kind of corruption in the database.
Have you repaired the database lately? If so, you might consider
importing all objects into a new database.

Lynn Trapp
www.ltcomputerdesigns.com
 
Still having the same problem, although now it does seem to be limited to
when i try to close a form.

Many Thanks,
 
What version of Access are you using?
Have you installed any service packs or upgrades recently?
If it works on other machines, but not yours, then something about you
computer has changed.
 
It is access 2007, i have removed office and put it back on including SP1.
I have removed all the windows updates from the past week manually and done
a system restore. Other databases seem to work fine. It must be a setting
on my machine for outlook that is only effected on that one machine, however
I do not have any idea what setting would create this problem. It seems to
be that if i step through the code the program works fine, and it is only
when i run the database without debuging that it crashes.
 
Then I would go with Lynn's suggestion.
Create a new accdb file.

Just for purity sake, here is what I would do.

open each code module, copy/paste the code to a text editor. note pad works
This includes any forms and reports that have code. After you have copied
the code to text, set the form/report's Has Module property to No and save it.

Remove all relationships.
If it is a split database, remove all links; otherwise, remove all indexs
from your tables.
Compact and repair the database

Open a new accdb file and import all the objects.
now for your code modules, create a new code module and copy/paste the code
from the test file back in.
Same for forms and reports. Open each in design view, click the code icon
and paste it's code back in place.

Relink your tables or rebuild your indexes
reset your relationships.

Compact and repair.

If that doesn't fix it, it is not your accdb file. It is either something
in Windows or Office.
Which make me think perhaps you should do a registry repair if you have a
tool to do that with.
 
Thanks for that however it did not resolve the problem, i have played around
comenting out parts of the code to see where the problem occurs. I have
many routines in the code like this one:

Dim sql As String
sql = "SELECT Training_Providers.TP_REF,
Training_Providers.TrainingProvider " & _
"FROM Training_Providers "
If Me!chkTPActive Then
sql = sql & "WHERE (((Training_Providers.Active)=True))"
End If

sql = sql & ";"

Me.ListTrainingProviders.RowSource = sql

which are responsible for updating serveral list boxes. IF i stop these
routines running then it seems to work fine. Likewise if i step through the
code then it works fine.
 
Back
Top