Hi
I have some code that creates a directory on a server based upon fields from a form. These fields are represented in the code by strEnq, strJob, strSubJob.
I also wish to check that the directory exists before performing the mkdirectory code. I have searched forums and looked at the vba help and have come up with the following code but it is not working. Could someone please look at it and point me in the right direction.
retvalue = Dir("\\nwaps-sbs\e\SurveyorsPhotosDrawings\ & strEnq & " - " & strJob & " - " & strSubJob")
If retvalue = True Then
MsgBox "Exists"
Else
MsgBox "help"
End If
I know that the directory exists but I just get the message box "help"
Thanks
Richard
I have some code that creates a directory on a server based upon fields from a form. These fields are represented in the code by strEnq, strJob, strSubJob.
I also wish to check that the directory exists before performing the mkdirectory code. I have searched forums and looked at the vba help and have come up with the following code but it is not working. Could someone please look at it and point me in the right direction.
retvalue = Dir("\\nwaps-sbs\e\SurveyorsPhotosDrawings\ & strEnq & " - " & strJob & " - " & strSubJob")
If retvalue = True Then
MsgBox "Exists"
Else
MsgBox "help"
End If
I know that the directory exists but I just get the message box "help"
Thanks
Richard