T
T''Kai
I have developed a series of steps to deploy new front-ends to my users. Part
of the process involves creating a temporary .txt file (TBR.txt) in the same
directory as the replaced front-end. Once the front-end has been replaced I
attempt to delete the .txt file, but it fails.
The .txt file should be removed on the opening of a special mdb file. This
is where the code fails. However, if I create a form and placed the same code
behind a command button, it delete the .txt file perfectly. No error message
is given when the deletion fails.
Why does this code work behind a command button and not on the open event of
a form?
Here's the code:
strPath = CurrentProject.Path & "\"
strTBR = strPath & "TBR.txt"
If Dir(strTBR) <> "" Then Kill strTBR
Any help would be appreciated. Thank you.
of the process involves creating a temporary .txt file (TBR.txt) in the same
directory as the replaced front-end. Once the front-end has been replaced I
attempt to delete the .txt file, but it fails.
The .txt file should be removed on the opening of a special mdb file. This
is where the code fails. However, if I create a form and placed the same code
behind a command button, it delete the .txt file perfectly. No error message
is given when the deletion fails.
Why does this code work behind a command button and not on the open event of
a form?
Here's the code:
strPath = CurrentProject.Path & "\"
strTBR = strPath & "TBR.txt"
If Dir(strTBR) <> "" Then Kill strTBR
Any help would be appreciated. Thank you.