Problem With Access Crashing

Problem With Access Crashing

am 12.01.2008 11:02:21 von wayne

I have an obscure problem with a simple Access 2003 database that
probably has an obscure cause. The database consists of a main form
with a subform. I have used the subform instead of a tab control.
The Sourceobject of the subform can be any one of 5 different forms.
The source object is chosen by an option group on the main form. When
an option is chosen, it changes the source object of the subform and
the appropriate subform is displayed. I've used this setup before
instead of a tab control and it seems to work well.

4 of my subforms are single forms with a handful of controls on them
and the 5th form is a continuous form with 2 fields. If I select a
record on the continuous form, choose to delete the record, but then
cancel the deletion, and then try to switch to another subform using
my option group control, Access crashes. This is a reasonably unusual
series of steps that I found by accident when testing the database.

If I do anything else on the continuous subform after cancelling the
deletion, for example if I apply a filter and then try to move to
another subform by using the option group, Access doesn't crash. The
database seems to be left in an unstable state after a record deletion
is cancelled and it doesn't seem to like having the option control
used. It doesn't matter which option I choose (which other subform I
choose) the crash still occurs.

I've compacted and repaired, decompiled etc to no avail. I'm using
Vista, so I booted into my XP partition to try it under XP and the
problem is still there. Guess I was grasping at straws there. The
interesting point is if I open the database in Access 2007 the problem
doesn't manifest.

Any clues as to a possible cause would be greatly appreciated.

Re: Problem With Access Crashing

am 12.01.2008 14:51:56 von Allen Browne

Wayne, you seem to have investigated this quite specifically, but a couple
of general concepts to eliminate before we conclude it's a bug.

First, make sure Name AutoCorrect is off.

Second, decompile to make sure it's not some phantom issue with the code.

Third, consider the linking of main form to subform. Particually, make sure
the foreign key field(s) -- i.e. the one(s) named in LinkChildFields -- are
text boxes in the subform. Often people just use a field name instead of a
control name in LinkChildFields, but IME that's unstable.

After making those changes, compact again.

Next, *after* you use the option group to switch to the problem form,
examine the LinkChildFields and LinkMasterFields in the Immediate Window,
e.g.:
? Forms!Form1!Sub1.LinkMasterFields
When you change the SourceObject, Access assigns whatever it wants to these
properties.

If the problem is still there, what Access 2003 is this? (SP3? SP2?)
And what version of msjet40.dll?

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Wayne" wrote in message
news:d3c46ca9-3fdc-43f7-a3bc-3b48113a55d2@m77g2000hsc.google groups.com...
>I have an obscure problem with a simple Access 2003 database that
> probably has an obscure cause. The database consists of a main form
> with a subform. I have used the subform instead of a tab control.
> The Sourceobject of the subform can be any one of 5 different forms.
> The source object is chosen by an option group on the main form. When
> an option is chosen, it changes the source object of the subform and
> the appropriate subform is displayed. I've used this setup before
> instead of a tab control and it seems to work well.
>
> 4 of my subforms are single forms with a handful of controls on them
> and the 5th form is a continuous form with 2 fields. If I select a
> record on the continuous form, choose to delete the record, but then
> cancel the deletion, and then try to switch to another subform using
> my option group control, Access crashes. This is a reasonably unusual
> series of steps that I found by accident when testing the database.
>
> If I do anything else on the continuous subform after cancelling the
> deletion, for example if I apply a filter and then try to move to
> another subform by using the option group, Access doesn't crash. The
> database seems to be left in an unstable state after a record deletion
> is cancelled and it doesn't seem to like having the option control
> used. It doesn't matter which option I choose (which other subform I
> choose) the crash still occurs.
>
> I've compacted and repaired, decompiled etc to no avail. I'm using
> Vista, so I booted into my XP partition to try it under XP and the
> problem is still there. Guess I was grasping at straws there. The
> interesting point is if I open the database in Access 2007 the problem
> doesn't manifest.
>
> Any clues as to a possible cause would be greatly appreciated.

Re: Problem With Access Crashing

am 13.01.2008 03:57:28 von wayne

Thanks for your reply Allen.

Name AutoCorrect is off. I've done a decompile as per my original
post. I can't link any master/child fields because the parent form is
an unbound form and doesn't have any fields. I'm using it purely as a
container for the subform and the option group, to get away from using
a tab control.

It's Access 2003 SP3 with the SP3 hotfix applied. msjet40.dll version
is 4.00.9635.0

After some more experimentation, I've noticed that it is not only the
action of cancelling a deletion on the continuous subform that is
causing the problem. If I cancel a deletion on any of the other
subforms and then try to move to another subform using the option
group, Access crashes. As per my original post, this only happens in
Access 2003. Access 2007 works fine.

Re: Problem With Access Crashing

am 13.01.2008 05:08:48 von wayne

More information after more experimentation.

I suspected that SP3 or the SP3 hotfix may be causing the problem, so
I uninstalled Office 2003 and then reinstalled it with SP2. The
problem is still there. I tried importing the handful of database
objects that the database consists of into a new Access 2003 database.
The problem is still there. I then imported the database objects into
a new Access 2003 database using the Access 2000 file format. The
problem is still there if I run the database under Access 2003.

However, if I run the database under Access 2000 SP3 the problem
disappears. To summarise: The problem is non-existent when the
database is run in either Access 2000 SP 3 or Access 2007 SP1 but if I
try to run it under Access 2003 it crashes. It's driving me nuts!

Re: Problem With Access Crashing

am 13.01.2008 05:53:34 von Allen Browne

Wayne, would you like to email me a copy of this db that demonstrates the
problem. I'll try to look at it later in the week if I can.

Derive my address from the signature below. Mention this thread.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Wayne" wrote in message
news:779ce9d1-5e06-4d55-a735-d7548bcfeda8@h11g2000prf.google groups.com...
> More information after more experimentation.
>
> I suspected that SP3 or the SP3 hotfix may be causing the problem, so
> I uninstalled Office 2003 and then reinstalled it with SP2. The
> problem is still there. I tried importing the handful of database
> objects that the database consists of into a new Access 2003 database.
> The problem is still there. I then imported the database objects into
> a new Access 2003 database using the Access 2000 file format. The
> problem is still there if I run the database under Access 2003.
>
> However, if I run the database under Access 2000 SP3 the problem
> disappears. To summarise: The problem is non-existent when the
> database is run in either Access 2000 SP 3 or Access 2007 SP1 but if I
> try to run it under Access 2003 it crashes. It's driving me nuts!

Re: Problem With Access Crashing

am 13.01.2008 06:45:10 von wayne

Thanks Allen. Database has been sent.