forms crash on close 2007

J

judith

I have been running a database in 2000 and just starting it up in 2007. For
now I need to leave the file format as 2000. The system works great with no
changes except that when I close it crashes. It seems that I can close the
database OK but then it crashes when closing Access.
I have tried to isolate the problem. I have a number of levels of sub form
and when i remove 2 sub forms that are at the 4th level then all is OK. I
have just tried opening the form that contains these 2 sub forms and again
all is OK. I have tried rebasing them on queries rather than forms but no
luck, it still crashes. Any suggestions please
 
A

Allen Browne

Judith, I don't have an answer, so hope others may contribute too.

I have one database that crashes A2007 on close. It's also an A2000 MDB with
lots going on, but I have not been able to pin down the culprit. Mine does
not have any sub-sub-subforms (4th level down.) When each form closes, if
there are no other forms or reports open and visible, it opens the
'switchboard', but that's the only odd thing it does on close, and disabling
that does not seem to solve it.

Are you using any class modules? Is there any chance they are not being
explicitly dereferenced? (Mine doesn't.)

Is yours an MDB (not MDE) that is being opened in earlier versions as well?
Mine is, and I'm aware this could trigger issues with bad VBA binary.

Presumably you have already applied SP1 for Office 2007. If not:
http://office.microsoft.com/search/redir.aspx?AssetID=DC102486291033&Origin=HH102511011033&CTT=5

Hopefully you have disabled compact-on-close so that is not a factor.

To elimate some other factors, you might try this sequence:
http://allenbrowne.com/recover.html
However, the one I'm struggling with is not solved by any of those steps.

Not sure what else to suggest. Keep the conversation going if you (or anyone
else) has any brilliant ideas.
 
J

judith

Thanks for all the info.

I think there may be a problem with running on 2000 and 2007 but I was not
encouraged when I pulled a version over to 2007, moved it all up to 2007,
compacted, repaired etc and it still happened. I have had problems with this
system when it was running entirely in 2000. if I inadvertantly opened it in
2003 it would sometimes loose all the VBA connections. Could well be due to
my bad VBA. I am sure it is an mdb, what is an mde?

I am using a few standard modules .. (I think they are probably some of your
excellent ones) ajbCalendar, modMousehook etc but I dont understand what you
mean by 'not being explicitly dereferrenced'

The only other thing I can think of is that the sub .. sub forms (4 levels)
are on tab tabs (2 levels)!

I will check the updates and try your recovery sequence.

Thanks
 
A

Allen Browne

In general, A2000 format MDBs are fine on A2007. I have only one that gives
this problem, out of dozens (possibly hundreds) that run fine.

The problem you referred to when you opened the 2000 format in a different
version could be the same one that's crashing A2007. First thing to do would
be to check the library references. This article explains references and the
ones appropriate to each version of Access:
http://allenbrowne.com/ser-38.html

Decompiling and also solve those problems.

An MDE is an 'executable' version of the database that you give to an end
user so they can't mess up the forms/reports or alter the code. You will
need to use Access 2000 to create an MDE from the 2000-format file. It's on
the Tools menu. Since an MDE cannot decompile, it averts the issue with the
bad VBA binary when swapping between versions. (BTW, we're talking about a
problem with Access itself here, not suggesting you wrote bad VBA code.)

The ajbCalendar is a standard module, not a class module, so the issue of
de-referencing does not arise here.

The recovery sequence may help, e.g. if decompiling, or Name AutoCorrect
issues.
 
N

NetworkTrade

one thing I have found unique to 07 in regard to unaccountable behavior of a
form:
a. make sure the form is sourced on a query and not directly on a table
b. make sure the key field is part of that query and is also somewhere on
the form (even if not visible)

I assume these two points would be equally necessary for subforms as well.

I do not know why these make a difference (particularly a.) - I don't want
to be accused of giving bad advice, but for me they have made the difference
on a couple of occasions.....and in the end only take a couple minutes
generally to conform to.... I hope this helps.
 
D

David W. Fenton

Decompiling and also solve those problems.

My first thought was decompiling, as I've seen compilation problems
cause crashes in Access going back to A97, just moving from one PC
to another (with different service packs installed).
 
A

Allen Browne

Your (b) suggestion makes good sense, and certainly does make a difference.

I'm not sure about (a) though. At least for JET tables I've never noticed a
difference.
 
J

judith

Just getting back with an update. I tried your decompile sequence. I was
slightly worried here as I am no expert but it was really easy to follow and
I found a couple of bits of dodgy code which I just deleted. Unfortuately it
still crashed. Next step I added the key fields to all my forms and sub
forms, often not visible but this made no difference either. I am a little
reluctant to rebase all the forms on queries as this seems to add a large
number of extra queries.
My only other thoughts are to try and reduce the levels of sub sub forms as
it seems to be the bottom level that is causing it to fail.

Thanks for all your help and suggestions
 

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