Terry Lawson
Registered User.
- Local time
- Today, 21:34
- Joined
- Mar 1, 2010
- Messages
- 12
I'm getting inconsistent (i.e. not always repeatable) errors when (in VBA) I try to add data to a previously emptied table.
The SQL statement includes three ascending sorts into a table which is not indexed and works OK when run as a stand alone Query.
When run in VBA as a Docmd.RunSQL(SQLtext) the resultant table is not always sorted by the three ascending fields.
I use the same table both before and after the add SQL statement by using the "set rsWorkTable=currentdb.openrecordset (''Table'')" method/action to update the data in Table1.
I'm certain that I always empty Table before the SQL and doing "set rsWorkTable = nothing" after each appropriate set command.
Suggestions?
Regards
Terry Lawson
The SQL statement includes three ascending sorts into a table which is not indexed and works OK when run as a stand alone Query.
When run in VBA as a Docmd.RunSQL(SQLtext) the resultant table is not always sorted by the three ascending fields.
I use the same table both before and after the add SQL statement by using the "set rsWorkTable=currentdb.openrecordset (''Table'')" method/action to update the data in Table1.
I'm certain that I always empty Table before the SQL and doing "set rsWorkTable = nothing" after each appropriate set command.
Suggestions?
Regards
Terry Lawson