I have (kinda) the following code:
Code:
Kill(Me.txtFullPath.Value & "\*.*")
to clear out all the files out of a specified folder. I then use:
Code:
RmDir(Me.txtFullPath.Value)
to remove the folder itself. I found out the hard way that (to my understanding) you had to clear out all files out of the directory before executing the RmDir command, or it would error out with a Permissions error.
It works fine as-is, as long as there is actually at least one file in the folder in question. If there are no files, and merely the existance of the folder (the folder will always exist, by the way), it errors out with a "File not found" error. Any ideas how to fix it?
I had thought about using Nz(), but I don't want to use it on that and blow something up.