Hi All
i have this code running on my customer details "on load" event
If Len(Dir(DLookup("FilePath", "Company Details", "CompanyID = 1") & "\" & Me.Full_Name, vbDirectory)) = 0 ThenMkDir (DLookup("FilePath", "Company Details", "CompanyID = 1")) & "\" & Me.Full_Name
End If
If Len(Dir(DLookup("FilePath", "Company Details", "CompanyID = 1") & "\" & Me.Full_Name & "\Invoices", vbDirectory)) = 0 Then
MkDir (DLookup("FilePath", "Company Details", "CompanyID = 1")) & "\" & Me.Full_Name & "\Invoices"
End If
If Len(Dir(DLookup("FilePath", "Company Details", "CompanyID = 1") & "\" & Me.Full_Name & "\Quotes", vbDirectory)) = 0 Then
MkDir (DLookup("FilePath", "Company Details", "CompanyID = 1")) & "\" & Me.Full_Name & "\Quotes"
End If
If Len(Dir(DLookup("FilePath", "Company Details", "CompanyID = 1") & "\" & Me.Full_Name & "\Statements", vbDirectory)) = 0 Then
MkDir (DLookup("FilePath", "Company Details", "CompanyID = 1")) & "\" & Me.Full_Name & "\Statements"
End If
this code makes the relivent folders "invoice , Quotes and statements" in the path set in the company details form
this works really well but i am wondering if this can be reduced to something more efficient,
as it is at the moment it works really well i am just curious to see if it can be improved upon
Steve