|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Backup database
I want the user to have the option of compacting/saving the database on exit. How can this be done? I would like to save to a different folder than the current location of the database.
|
|
#2
|
|||
|
|||
|
Hi agates,
The following code can be run from a command button on a form that will give the user the option. This will only work with Access 2000 and higher. To compact the database: Public Sub CompactDB() CommandBars("Menu Bar"). _ Controls("Tools"). _ Controls("Database utilities"). _ Controls("Compact and repair database..."). _ accDoDefaultAction End Sub To back up the database and open the dialog box to select folder or directory for your back up copy use this: Public Sub BackUpDB() CommandBars("Menu Bar"). _ Controls("Tools"). _ Controls("Database utilities"). _ Controls("Back Up Database..."). _ accDoDefaultAction End Sub lwells |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Backup database |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|