In my code, I create and fill a table that typically has about 100,000 records. The first field, ID, is an autonumber field.
Later in my code, I copy this table to other MDB programs. Doing this causes the ID numbers to keep incrementing, but I want each copy to be IDENTICAL. So, I try to change the Data Type from Autonumber to Long with DDL code like...
Usually this works perfectly, but when the table occasionaly has about 600,000 records, I get an error message re Lack of System Resources.
Even if i manually open the table in Design View and try to change the ID field from Autonumber to Number (Long), I get the error message "There isn't enough disk space of memory."
Here's the question - how can I use VBA or DDL to modify a field's data type from Autonumber to Long WHEN THE TABLE IS LARGE?
Thanks
teach314
Later in my code, I copy this table to other MDB programs. Doing this causes the ID numbers to keep incrementing, but I want each copy to be IDENTICAL. So, I try to change the Data Type from Autonumber to Long with DDL code like...
Code:
db.Execute "ALTER TABLE " & strTblName & " ALTER COLUMN [ID] LONG"
Usually this works perfectly, but when the table occasionaly has about 600,000 records, I get an error message re Lack of System Resources.
Even if i manually open the table in Design View and try to change the ID field from Autonumber to Number (Long), I get the error message "There isn't enough disk space of memory."
Here's the question - how can I use VBA or DDL to modify a field's data type from Autonumber to Long WHEN THE TABLE IS LARGE?
Thanks
teach314