Tony Septav
iggy at nanaimo.ark.com
Mon Oct 20 10:47:13 CDT 2008
Hey All
Just thought I would share this (some of you will probably say "Of
course you twit that was the problem"). Way too much time wasted on this
one.
Pulled the code apart,checked the path string etc. etc etc. and discovered.
Len(Dir(Trim(PDrive), vbDirectory)) was causing the problem.
MkDir Trim(PDrive)
If Len(Dir(Trim(PDrive), vbDirectory)) = 0 Then
DoCmd.Beep
MsgBox "Sorry cannot create this path - " & PDrive & ". Please
check that you have access rights...", 48, "Message"
Exit Sub
End If
I added this and I no longer get error messages and the folder deleted
no problem.
If Len(Dir("C:\", vbDirectory)) = 0 Then
End If
Further down in the code I had something similiar
If len(dir(trim(PDrive) & "Data.mdb")) = 0 then
to see if the data.mdb existed, if not place a clean copy in the
folder/directory, had the same delete problem until I changed my code
logic.