• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 288
  • Last Modified:

db crashes when reset in vba

In one of my databases whenever I reset the project in vba after an error the entire db shuts down.

Can someone help me construct a checklist to find out why the db is closing after every reset?
0
Shawn
Asked:
Shawn
  • 11
  • 5
  • 2
  • +1
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Have you tried the Decompile procedure ?
0
 
ShawnAuthor Commented:
wow, thought I did but I guess it was a while back.
That did the trick!

Is that common? It seems to reoccur once I've been coding for a while.
0
 
ShawnAuthor Commented:
spoke too soon. still crashes on a form when I end the procedure
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
ShawnAuthor Commented:
for example. I've set up a subform to show recorded errors. When I click on a button "view" which opens that record it throws an error if there are no errors in the subform (logical).

the error then reports "Syntax error (missing operator) in query expression '[ErrorID]='."

When I click reset the db closes.
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Didn't Cap1 have you replace a Form last week?  Or was that someone else ?
Have you tried creating a new, blank db ... then importing all objects (except Linked tables) ?

mx
0
 
ShawnAuthor Commented:
yep, that was me.
created new db and all the rest of in the list you guys helped set up.

this bug has been ongoing for ages. gets frustrating while coding and even more so when people are trying to work with the db.
0
 
ShawnAuthor Commented:
I'm wondering, it's a pretty old db and there is a lot of unused code and even blank procedures. Is there a way/tool to clean up the db?

this might fix numerous quirks.
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Do you have Rick's Find & Replace ?

http://www.rickworld.com/products.html#Find and Replace 9.0

This has a xReference feature that will help you find unused objects & code.

And this excellent product as well (I have both):

http://fmsinc.com/MicrosoftAccess/BestPractices.html

Pretty much one of these tools will be necessary for the cleanup ...
0
 
ShawnAuthor Commented:
I do have the Replace product but have never tried it for that type of replace.

I'll look into it and get back.

cheers
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Cross Ref:

F
0
 
ShawnAuthor Commented:
ok, I have this window open but cannot see how to find unused object and code.

could you show me an example?
0
 
ShawnAuthor Commented:
>>Total Access Analyzer $299 per version. ouch. I just bought vb Watchdog.
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Well, yes a bit more ... but ... the data TAA collects on your db is simply amazing - seriously, the full time I ran a full scan ... wow!
0
 
ShawnAuthor Commented:
ok, I'll put it on my list. Looks good though it would be nice if they gave a discount :)
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
still crashes on a form when I end the procedure
Does it always crash on the same form, or does any form produce the crash?

If it's always the same form, then you may just have a corrupt form. Did cap have you REPLACE that form with a NEW form, or did you replace it with one from a backup?  Sometimes the backup is corrupt as well, and the only recourse is rebuilding the form from scratch.

If that doesn't work - does this happen on all machines, on only on your machine? If it's on all machines then the trouble is likely with the database, but if it only happens on your machine, then be sure that you've fully updated Access and Windows.
0
 
ShawnAuthor Commented:
>>Does it always crash on the same form, or does any form produce the crash?
any form in the db crashes.

>>does this happen on all machines
yes, we use this db in Windows xp and TS on Windows server 2003. We use Access 2002, sp3 and the db is in the 2000 format.

So it happens on all forms and at least 2 different platforms.

I'm wondering if maybe Access 2003 or 2007 would be more stable. Thoughts?
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
I have no idea if it would be more stable, but given that Access 2002 is 5 versions old, you're sort of working against yourself.

If you want my opinion, it's loooooong past time to upgrade. If it were me, i'd move up to 2010 ...
0
 
ShawnAuthor Commented:
ok, I'm going to try that. we only have licensing up to 2007 right now so I guess 2007 will have to do.
0
 
Jeffrey CoachmanCommented:
For laughs, try creating a blank new database and importing all the objects.

But like LSM, I would consider upgrading.

Windows and Office share a great many system files.
So most updates to Windows now, may not support a 10 year old Access format...

Access 2002 has long past out of it's support cycle...
http://support.microsoft.com/gp/lifeoffice#Office

JeffCoachman
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 11
  • 5
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now