I'm trying to use VBA to compact a database on a sheduled timer. When I run the following code I get the error message:
You attempted to open a database that is already opened excluisvely by user 'Admin' on machine 'XXXXX'. Try again when the databse is available.
This happens with every database, even the one's with no specific admin access issues.
It seems that the only way to compact a database in Access 97 is to use the menues. I've tried to use the macro generator --> Run Command -> Compact -- but I get a similar error message.
Looking at what access does when I select compact from the menu, it looks as though it must close all windows before it can excecute the command.
Has anyone else run into this problem?
You attempted to open a database that is already opened excluisvely by user 'Admin' on machine 'XXXXX'. Try again when the databse is available.
This happens with every database, even the one's with no specific admin access issues.
It seems that the only way to compact a database in Access 97 is to use the menues. I've tried to use the macro generator --> Run Command -> Compact -- but I get a similar error message.
Looking at what access does when I select compact from the menu, it looks as though it must close all windows before it can excecute the command.
Has anyone else run into this problem?