I have a database which needs to create new directories on the fly as follows...
sCurrentDir = Dir("T:\Customer Support\VFSalesMI\Orders & Deliveries\" & CStr(lYear) & "\" & sMonthNo & sYearNo & "\", vbDirectory)
If sCurrentDir = "" Then
sNewDir = "T:\Customer Support\VFSalesMI\Orders & Deliveries\" & CStr(lYear) & "\" & sMonthNo & sYearNo & "\"
MkDir sNewDir
End If
It first checks to see if it exists already and if not creates the new directory. However on the MkDir command I'm getting the error 76 - Path Not Found. But of course it's not found, its supposed to be creating it. Is this error due to the directory being too long, or something else? If so, is there another way of implementing this?
sCurrentDir = Dir("T:\Customer Support\VFSalesMI\Orders & Deliveries\" & CStr(lYear) & "\" & sMonthNo & sYearNo & "\", vbDirectory)
If sCurrentDir = "" Then
sNewDir = "T:\Customer Support\VFSalesMI\Orders & Deliveries\" & CStr(lYear) & "\" & sMonthNo & sYearNo & "\"
MkDir sNewDir
End If
It first checks to see if it exists already and if not creates the new directory. However on the MkDir command I'm getting the error 76 - Path Not Found. But of course it's not found, its supposed to be creating it. Is this error due to the directory being too long, or something else? If so, is there another way of implementing this?