Hi,
The execution time itself is not known at priori neither the number of
records "affected". There is no official hook letting you know the progress
done by the query.
What could be done in some cases (with action queries rather than SELECT
queries) is to make "n" small queries, rather than one large, and advance
the progression bar once each of the small queries is done (assuming your
code does not work asynchronously with the query execution thread). That is
likely to make the whole execution time larger, but maybe more robust (the
end user less likely to panic, and possibly locking the table in smaller
chunks of time). Note that you *may* got a situation where some of the "n"
action queries would be executed, and some of the last ones are NOT executed
(for some reason). The possibility, even if quite improbable, has to be
analyzed. If that is found unacceptable, you would have to use a transaction
over the whole set of the n small queries.
Hoping it may help,
Vanderghast, Access MVP