0

Hi and thanks for all help.

How to erase a file

   file.Delete (App.Path & "\backup\PhoneTel.mdb")

it do not work.

Or do like this instead that the file phonetel.mdb
is uppdating evry time you press enter.

3
Contributors
2
Replies
17
Views
4 Years
Discussion Span
Last Post by Jx_Man
0

Try :

 Private Sub Command2_Click()
     Kill (App.Path & "\backup\PhoneTel.mdb")
 End Sub

Or you can do like this :

Private Sub filedelete(filename As String)
    Dim filesystemobject As Object
    Set filesystemobject = CreateObject("Scripting.filesystemobject")
    filesystemobject.deletefile filename, True
End Sub

Private Sub Command2_Click()
    filedelete (App.Path & "\backup\PhoneTel.mdb")
End Sub
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.