D
David W. Fenton
If access goes off and prefetches the next process thread for
forms, does it do this for queries too?
Totally separate issues. Jet/ACE is processing the query, while your
form has to be processed by both Access and Jet/ACE (unless the form
is unbound, in which case all the work is done by Access). In
general, Jet/ACE retrieves data asynchronously, i.e., using Rushmore
technology, you can start using the beginning of a retrieved
recordset before the last record in it has been retrieved.
If this is the case, then is there any way to
force a pause between these threads?
Your question is too abstract to be answered.
I suspect by the tickelish nature of
this bug, some place in the main stream code is being corrupted.
(I've seeen this in some of my C coding bugs.)
I used to run into weird problems in the cvrtNNN.dll, i.e,. the C
virtual runtime library, in Access 2000, particularly in the
situation where in a subform I referred to a field in the underlying
recordset of its parent form. In that case, it required a control on
the parent form with the underlying field as the controlsource.
Perhaps you've got a problem like that.
My experience is that Access 2000 introduced major bugs and
inconsistencies with previous versions in the way forms are bound to
recordsets. And there are issues with changes in the order of events
in later versions. I recently upgraded an A97 app to A2003, and
started having a regularly recurring bug on close of the app that
was caused by code in the OnUnload event of a subform that fired
before the parent form unloaded in A97 but only *after* the parent
form ceased to exist in A2003. I had to completely change my method
of accomplishing what I wanted to do (I was using a single form both
as subform and as standalone form, and in the latter context, it
needed to do things in the OnUnload event; if it was a subform, it
needed to ignore that event; I ended up changing to passing an
OpenArgs parameter to the form when opened standalone so I didn't
need to test if the form instance was a subform).
The culprit seems to be a make table query which is trying to copy
a very large, maybe too large, table.
What about replacing the MakeTable with a pre-existing empty table
and an APPEND query? Surely that will be faster? Perhaps not fast
enough, but it's worth a try, seems to me. Personally, I have
virtually no MakeTables in production apps. The only exception is
for archiving datasets, usually records that are getting exported
for some regular purpose. But those tables get made in a standalone
archive MDB that exists for the of storing those MakeTables. In
fact, nowadays, I would likely have an empty shell table, copy it to
the new table with the appropriate name and APPEND the current
archive to that.
But this all likely has little to do with your issue.
I would say that you might try something like:
- wrap your MakeTable/Append in a transaction,
- after it is launched, loop until there are records in the table.
There won't be any records until the transaction is committed, so
that would prevent the next step from executing until your table was
fully populated and ready to use.
Tom, your friend's filter program shows the
table to be too large if completely filled out. So I'm working on
trimming it down to size. Smaller assigned fields etc. But a
major re-design would a major effort and my bosses would be quite
upset over the delay. So this feature may go on indefinate hold.
Thank you all for all your help, and I'll keep you all advised of
my progress.
I've lost the original context, but if you're creating a temp table
to run a report, you might consider populating the table in the
OnOpen event of the report. In that case, I believe the report won't
display until the table is populated.