How can I rename a newly compacted database? 
Author Message
 How can I rename a newly compacted database?

Once I have verified the newly compacted database exists,
I want to delete the old and rename the new. How do I
rename the new database?

Thank you for your valuable service.

Cheri



Tue, 06 Dec 2005 00:25:43 GMT  
 How can I rename a newly compacted database?
Where are you trying to do this?
Within an Access application?
At the Dos/Command prompt?
Somewhere else?

Regards

Peter Russell


Quote:

> Once I have verified the newly compacted database exists,
> I want to delete the old and rename the new. How do I
> rename the new database?

> Thank you for your valuable service.

> Cheri



Tue, 06 Dec 2005 02:22:00 GMT  
 How can I rename a newly compacted database?
Use the following code to rename a file.  The file can NOT be open or in
use.

    Dim strOldName As String
    Dim strNewName As String

    strOldName = Application.CurrentProject.Path & "\oldname.mdb"
    strNewName = Application.CurrentProject.Path & "\newname.mdb"

     Name strOldName As strNewName
-------------------------------

Application.CurrentProject.Path returns the path to where the database is
presently residing.
You can enter the exact Path here if you like, but this is more portable.

Since you didn't ask I assume you know how to delete the old database file.

Rick C


Quote:
> Once I have verified the newly compacted database exists,
> I want to delete the old and rename the new. How do I
> rename the new database?

> Thank you for your valuable service.

> Cheri



Tue, 06 Dec 2005 07:08:55 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Compact Database no permissions for database

2. Closing database, recordset to compact my database

3. Problem closing newly created jet database

4. Closing databases, recordset? to compact database

5. Invalid database format error when compacting Access2K database

6. Compact/repair won't finish, "can't rename database because it's read-only"

7. How do I create a canned form?

8. Canned AcctReceivable Module needed!

9. Canned pages....

10. Cans access2.0 engine access btrieve files?

11. Crystal Reports Canned Code

12. Canned objects and/or images

 

 
Powered by phpBB® Forum Software