Is there any safe way to loop through all Access databases and end-goal - compact/repair everything? Here's what I would LIKE to do if I can know there's a safe way to do it:
[ol I]
[li]Loop through all Access Database files - I'd just assume to use the FileSystemObject for that, so that's simple enough.[/li]
[li]For each database, I'd like to run these steps in order:[/li]
[ol A]
[li]Backup the database[/li]
[li]Run compact/repair on the database (would actually prefer to go ahead and do this way:[/li]
[ol 1]
[li]Decompile[/li]
[li]Compact/Repair[/li]
[li]Compile (usually done via VB Editor window)[/li]
[li]Compact/Repair[/li]
[/ol]
[li]If know for sure that the compact/repaired copy is stable, then delete the backup[/li]
[/ol]
[li]Move to the next database in line, do the same thing.[/li]
[/ol]
There is one other small caveat that may post tricky. That is we still have some people in one group in our department who are mainly or some using Office 2007, whereas everyone else is using 2010. Well, I've run into a weird delimna in the past, which the only clear way around was to create their database(s) in .mdb format:
[ol 1]
[li]I would create the database to be compatible with 2007 AND 2010, build with 2010 on my machine[/li]
[li]I then had them do some work in the database, using Access 2007.[/li]
[li]After some changes made, I compacted and repaired the database, but made no changes regarding compatibility.[/li]
[li]Next time one of them tried to open with 2007, they got the message stating, "This was built with another version of Access, and is incompatible with your version of Access."[/li]
[/ol]
So, it'd also be good to know if there is any automated way to get around the latter item, which I could mix into this, or else a way that I could simply skip those items which could be problematic in that way.
Thanks for any thoughts or suggestions
"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
[ol I]
[li]Loop through all Access Database files - I'd just assume to use the FileSystemObject for that, so that's simple enough.[/li]
[li]For each database, I'd like to run these steps in order:[/li]
[ol A]
[li]Backup the database[/li]
[li]Run compact/repair on the database (would actually prefer to go ahead and do this way:[/li]
[ol 1]
[li]Decompile[/li]
[li]Compact/Repair[/li]
[li]Compile (usually done via VB Editor window)[/li]
[li]Compact/Repair[/li]
[/ol]
[li]If know for sure that the compact/repaired copy is stable, then delete the backup[/li]
[/ol]
[li]Move to the next database in line, do the same thing.[/li]
[/ol]
There is one other small caveat that may post tricky. That is we still have some people in one group in our department who are mainly or some using Office 2007, whereas everyone else is using 2010. Well, I've run into a weird delimna in the past, which the only clear way around was to create their database(s) in .mdb format:
[ol 1]
[li]I would create the database to be compatible with 2007 AND 2010, build with 2010 on my machine[/li]
[li]I then had them do some work in the database, using Access 2007.[/li]
[li]After some changes made, I compacted and repaired the database, but made no changes regarding compatibility.[/li]
[li]Next time one of them tried to open with 2007, they got the message stating, "This was built with another version of Access, and is incompatible with your version of Access."[/li]
[/ol]
So, it'd also be good to know if there is any automated way to get around the latter item, which I could mix into this, or else a way that I could simply skip those items which could be problematic in that way.
Thanks for any thoughts or suggestions
"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57