Now I know this subject has been talked about multiple times in the forum before but there are a couple of things I would like to ask. Firstly, the code below has been suggested to compact a database you are inside.
SendKeys "%W1"
SendKeys "%TDC"
This works fine when the normal menu bar is displayed while viewing the database window. However when the database is actually opened properly this code does not work (I presume because of the changes in the menu bar options). Once the database is complete I will be using my own created menu bar with barely any options on it anyhow.
Does anyone know how to get this compacting command to work while running the database properly with the database window hidden?
My other question concerns what this code actually does. It closes the database, compacts it and then re-opens it. Does anyone know how to just close and compact it without re-opening as if so I could then include it on the Exit button of the database.
Also if anyone knows of any other alternative suggestions while still using VBA code or macros I would be very interested.
Thanks all
SendKeys "%W1"
SendKeys "%TDC"
This works fine when the normal menu bar is displayed while viewing the database window. However when the database is actually opened properly this code does not work (I presume because of the changes in the menu bar options). Once the database is complete I will be using my own created menu bar with barely any options on it anyhow.
Does anyone know how to get this compacting command to work while running the database properly with the database window hidden?
My other question concerns what this code actually does. It closes the database, compacts it and then re-opens it. Does anyone know how to just close and compact it without re-opening as if so I could then include it on the Exit button of the database.
Also if anyone knows of any other alternative suggestions while still using VBA code or macros I would be very interested.
Thanks all