I have next function to implement
Public Function SetSaveName(lngLead As Long) As String
Dim lngDeb As Long, strProject As String, stLink As String
Dim strPath As String
stLink = "[MP_id] = " & lngLead
lngDeb = Nz(DLookup("debiteurnr", "MARKTPARTIJ", stLink), 0)
strProject = Nz(DLookup("bedrijfsnaam", "MARKTPARTIJ", stLink), ""
strPath = "C\" & lngDeb & "\" & strProject
End Function
Now I want to check If path already exist.
If it exists it's oke and I go further to set
SetSaveName to strPath & "blabla.doc"
IF it not exists I have to create the path.
Anyone an idea to handle this?
I have no idea to check the path and I have no idea to create the path. So any help very appreciated,
Gerard
Public Function SetSaveName(lngLead As Long) As String
Dim lngDeb As Long, strProject As String, stLink As String
Dim strPath As String
stLink = "[MP_id] = " & lngLead
lngDeb = Nz(DLookup("debiteurnr", "MARKTPARTIJ", stLink), 0)
strProject = Nz(DLookup("bedrijfsnaam", "MARKTPARTIJ", stLink), ""
strPath = "C\" & lngDeb & "\" & strProject
End Function
Now I want to check If path already exist.
If it exists it's oke and I go further to set
SetSaveName to strPath & "blabla.doc"
IF it not exists I have to create the path.
Anyone an idea to handle this?
I have no idea to check the path and I have no idea to create the path. So any help very appreciated,
Gerard