vba problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am having a problem with vba corrupting the database. About once a week
when I am editing vba code, usually typing a line of code, vb will lock up
and I get the "Oh so friendly Sorry for the inconvience but you are out of
luck and do I want to send a copy to MS, form." My database at this point
has about 150 forms, 100 linked tables, 530 stored queries and 25 modules.
The total file size is about 12M when compacted. I am using Accesss 2003 sp1
on Windows xp sp2. The problem started appearing a month or so ago which
would indicate that it is related to the file size or the number of objects.
At least up to this point, I have been able to restore the database by
running it with the /decompile option. There was a similar problem in Access
2000 that was fixed in sp2 in which vba corrupted the file when the file size
was bigger than some limit I no longer remember. Does anyone know anything
about this issue?
 
Sounds like you got some problem with your computer (setup, or install), or
some damage has occurred to your mdb file.

A few things:

can you create a mde file?

When you make a code change, try using ctrl-s to save, and then go
debug->compile

I always done the above, since you should save things when you make code
changes, and even more important is to compile the code each time.

Try also creating a blank mdb, and importing everything from the old one
into anew one.

Further, are you using the a2002 format....if not, give that try. (the
default format is a2000).

Also, I assume you installed the latest sp fixes to office....

Try all of the above and see if that helps.

Given your size of your application, and the number of forms, you are in the
medium range, and nothing close to some "large" ms-access applications with
200 meg front ends, and 2-3 times the number of forms that you got.

It is certainly not the small size of your application here..as it is common
to see applications 10 times your size...
 
Thanks for the reply. I do compile-save or sometimes save-compile often as I
am working. The error will occur as I am typing in an line of code.
Everything just stops and file is corrupted.

I have occasionally recreated the db by creating a blank database and
importing everything from the old one. When I do this, I get another
problem. The forms, and modules import without a problem but if I try to
import all the queries in one step, I get the "Sorry for the inconvience but
.... form" In this case, I can restart the db and it seems to work ok. If I
import the queries maybe 30 or 40 at a time, I don't get the error. I am
using Access 2000 format because the db has to run on older installations. I
looked in the Downloads and as far as I could tell, sp1 is the latest sp. If
no one else is seeing these problems, then I will try reinstalling Access and
see if thngs improve.
 
If I
import the queries maybe 30 or 40 at a time, I don't get the error

Hum, that already hints at something not being right. Sure, you can "work
around" the problem by selecting a only 30, or 40, but the whole mess should
import ok.

For sure, as a developer we "always" avoid land mines, and when some type
of import fails etc, then we have to take action like you did above (I agree
with this as a "general" approach to software). So, when something breaks,
we
"work around" the problem.

In other words, I think you got a good attitude, and are willing to "work
around" problems that occur. This is a sign of a good developer by the way!.
However, sometimes our willingness to "work around" problems is our own
demise, and then we often don't seek a acceptable solution!!

In this case, the import query failure is just un-acceptable to me, and it
should not be occurring.
as far as I could tell, sp1 is the latest sp.

There is also sp2 out now....

And, to be fair, the reason why I found out about sp2 is that I did get a
crash in ms-access, hit send report, and then a prompt box came back with a
"click here to learn more about this problem". when I clicked on it, I got a
crash analyses web page, and it explained to me that this crash likely would
be fixed by installed sp2.

That crash test analyses stuff going on at ms is actually creating a
revolution
in software quality......
no one else is seeing these problems, then I will try reinstalling Access
and
see if thngs improve.

You can while in office go help->detect and repair.

I would do that, then go and install sp1, and then sp2....

You can find sp2 here:

http://office.microsoft.com

You should also be able to go help->check for updates....

(but, that seems to be not working for me as I write this.).
 
Back
Top