Mega Code Archive

 
Categories / VisualBasic Script / Access
 

Deleting a Database File

Sub DeleteDbFile()      Dim strFile As String      strFile = CurrentProject.Path & "\mydb.mdb"      If Dir(strFile) <> "" Then          Kill strFile          MsgBox "The database file " & strFile & _                 " was successfully deleted."      End If  End Sub