Solved Temp Form in VB Editor

The safest method is to compact when the database is closed, either from Explorer or using code from another database
ah ok well never done any of that..
So for instance if I want my database to have an automated back up and compact what you be the saves thing to do?

A seperate "program" to do so?

And how can you compact it from the explorer?
 
Hi,
the database at present is not split but will split it in the near future still developing stage..


Thanks for the Code Snippet! Will look into it

many thanks
 
Don't remember seeing the answer to this. Is your database split? You could take a look at this sample code.

1- Backing up the database FSO.CopyFile .....
2- Executing Application.SetOption "Auto compact", True
3- Application.Quit

Can not be done?
 
You should develop with the split version. Otherwise, once you split, you need to perform a complete retest:(
 
Can not be done?
It can. But my question first is, are you talking about doing that on a split database? If so, which file do you intend to compact?
 
It can. But my question first is, are you talking about doing that on a split database? If so, which file do you intend to compact?
OP says his database is not split. So in a not split database.
 
OP says his database is not split. So in a not split database.
In that case, if we do what you suggested, it seems the backup copy won't be compacted.
I responded to your post because you quoted my post, which meant you were talking to me. When I posted it, the OP hadn't specified yet if their db was split or not. The code I provided is meant for a split database.
 
In that case, if we do what you suggested, it seems the backup copy won't be compacted.

Surely that's the standard approach. I run a backup BEFORE compacting as a precaution against possible corruption whilst compacting
 
Surely that's the standard approach. I run a backup BEFORE compacting as a precaution against possible corruption whilst compacting
By using the compact on close as was suggested? Just checking...

PS. The code snippet I provided also creates a backup first and then compacts it. Just FYI...
 
Last edited:
In that case, if we do what you suggested, it seems the backup copy won't be compacted.
Maybe I'm still half sleep and need another cup of coffee to get back to my feet. but :

Op:
So for instance if I want my database to have an automated back up and compact what you be the saves thing to do?

You;
Don't remember seeing the answer to this.

Me:
1-Backup 2-Change database property. 3- Quit application to compact.
It was just a suggestion that it can be automated.
 
Last edited:
By using the compact on close as was suggested? Just checking...
I stated in post #20 that I never compact on close. I always do so manually and recommended compacting externally

@silentwolf
You can compact a database externally in several ways
1. Using a command line switch:
Click Start/Run or click the Search button in the taskbar then type in the fill path to your database (in quotes followed by /compact
e.g. "G:\MyFiles\AUG Europe\Presenters&Topics\AUGEurope.accdb" /compact
Then click Enter. The DB will open, compact & close automatically

2. Using a right click context menu
Daniel Pineault has a Database Tools menu item allowing you to compact / decompile etc directly from Windows Explorer

You can adapt it to your own purposes e.g.

1654426030757.png


3. Using code from another database
A Google search will give many examples. I can provide my own if necessary
 
Hi,
many thanks for your input isladogs!

Now I know how to compact but I did a split and need to still make modifications to my "backend" now when I still need to change some tables or even delete some of it what than?

How can I get the front end updated to the new version of the "backend" ?

I am struggling to get the new database linked..

Please help lol tryed with linked table Manager but no luck in getting the new file always stayes on the same file path.

Cheers
 
Which version of Access are you using? Do you have the new linked table manager or the old version?

1654452571537.png
 
Hi I am using Access 2013,

so the Old Linked Table Manager.

hmm struggling to get that working.
 
Hi guys,

I managed to get it working. But in my Access Version there is no New Datasource button so I had to go in Access Database Import to get the dialog to set the new Datasource.

Many thanks to all of you and your help it is much appreciated and learned again lots.

Cheers!
 
The External Data ribbon has been changed since 2013 but the import / link process is basically identical

Anyway, glad you have a solution
 
Last edited:
The External Data has been changed since 2013 but the import / link process is basically identical
Ok understand but it was first time for me to split Databases
as I always was not sure how to update it correctly so I worked with single database for my own work.

But now I got closer to have it better set up thanks to your guys help and input!


Cheers
 

Users who are viewing this thread

Back
Top Bottom