HelgeLarsen
Programmer
I have made a rather comprehensive VBA routine that documents the content of Access databases, especially tables and queries. I find the number of records in a table by:
For Each aTabDef In CurrentDb.TableDefs
aRecordCount = aTabDef.RecordCount
Next aTabDef
However, I have recognized that sometimes the number of records is wrong - until I have made a 'Compact and Repair database'. Should this be expected?
A 'Compact and Repair database' might take quite a time for large databases. Therefore, can I do something else to update the record count?
(Actually, I have only seen wrong record counts when running a database that I have just received from a partner using German setup, and then opens it on my PC using English setup - although in Denmark.)
________________________
Helge Larsen
For Each aTabDef In CurrentDb.TableDefs
aRecordCount = aTabDef.RecordCount
Next aTabDef
However, I have recognized that sometimes the number of records is wrong - until I have made a 'Compact and Repair database'. Should this be expected?
A 'Compact and Repair database' might take quite a time for large databases. Therefore, can I do something else to update the record count?
(Actually, I have only seen wrong record counts when running a database that I have just received from a partner using German setup, and then opens it on my PC using English setup - although in Denmark.)
________________________
Helge Larsen