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