delete database??? (1 Viewer)

dxp

Registered User.
Local time
, 18:54
Joined
Jun 5, 2006
Messages
62
Is it possible to delete an entire seperate database from within a database via code after an uodate procedure has been carried out on a click event of a commad button, what would the code be to acheive this if its possible??:rolleyes:
 

ssteinke

for what it's worth
Local time
, 21:54
Joined
Aug 2, 2003
Messages
195
Look up the Kill() function, you may need to use the Dir() function first to verify that the database exists before using Kill.
 

dxp

Registered User.
Local time
, 18:54
Joined
Jun 5, 2006
Messages
62
thanks for the advice, but I think I wont persue this method it might be a little to drastic if it goes wrong or gets into the wrong user hands.
 

ssteinke

for what it's worth
Local time
, 21:54
Joined
Aug 2, 2003
Messages
195
I'm not sure what seams drastic since it should do exactly what you asked. Is there a specific concern you have that may calm your fears? Your end-user should not be able to get into your vba code anyhow since you should be able to convert the final deployment into an mde. But regardless, using the Kill function should allow you to delete another database, (although I have not tested, you will probably need to ensure that nobody is using the database to be deleted). Good luck,

Scott
 

Users who are viewing this thread

Top Bottom