H
HartJF
My routine uses a stored append query to place records in a temporary,
persistent table. Immediately after the query is a FindFirst statement
against the temporary table. I noticed that sometimes, some records were
being ignored. I placed a breakpoint on the FindFirst; sometimes, it
continued properly, sometimes, it didn't. If I stopped the program and then
restarted, it always continued properly. I placed a MoveLast statement
against the temporary table between the query and the FindFirst and moved the
breakpoint there. Sometimes, I received a "No current record" error (3021).
In Immediate mode, I printed BOF and EOF statuses, which were both true.
Again, if I stopped and resumed execution, it always continued properly. I
added an error handler to Resume on a 3021; sometimes, it continued properly,
and sometimes, it didn't. During the break in each of the failing cases, I
opened the temporary table, and it did, indeed, have records.
The append query is selecting a few specific records (2 to 5) for further
group processing from a table with over 100,000 records. At the breakpoints,
the table underlying the append query has the appropriate grouped records
flagged for extraction.
What am I missing? I understand that the query does not complete before the
next command is executed, but I thought that at least one resulting record,
if one exists, is captured. I tried the MoveLast to force completion of the
query.
I initialized the recordset variable for the temporary table at the
beginning of the program. After the group processing is complete, a delete
query is executed to clear the table.
I can't manipulate the source of the append query as a recordset because it
is based on a union query which is, by definition, not updatable.
Help!!! I'm using Access 2003 SP3 in a Windows XP environment.
persistent table. Immediately after the query is a FindFirst statement
against the temporary table. I noticed that sometimes, some records were
being ignored. I placed a breakpoint on the FindFirst; sometimes, it
continued properly, sometimes, it didn't. If I stopped the program and then
restarted, it always continued properly. I placed a MoveLast statement
against the temporary table between the query and the FindFirst and moved the
breakpoint there. Sometimes, I received a "No current record" error (3021).
In Immediate mode, I printed BOF and EOF statuses, which were both true.
Again, if I stopped and resumed execution, it always continued properly. I
added an error handler to Resume on a 3021; sometimes, it continued properly,
and sometimes, it didn't. During the break in each of the failing cases, I
opened the temporary table, and it did, indeed, have records.
The append query is selecting a few specific records (2 to 5) for further
group processing from a table with over 100,000 records. At the breakpoints,
the table underlying the append query has the appropriate grouped records
flagged for extraction.
What am I missing? I understand that the query does not complete before the
next command is executed, but I thought that at least one resulting record,
if one exists, is captured. I tried the MoveLast to force completion of the
query.
I initialized the recordset variable for the temporary table at the
beginning of the program. After the group processing is complete, a delete
query is executed to clear the table.
I can't manipulate the source of the append query as a recordset because it
is based on a union query which is, by definition, not updatable.
Help!!! I'm using Access 2003 SP3 in a Windows XP environment.