Hi,
i have the following to create a directory
Dim DirName As String
Dim Response As String
DirName = "F:\test\" & Left(Me!contract_number, 10)
If Dir(DirName, vbDirectory) = "" Then
If MsgBox("OK to create folder!", vbOKCancel) = vbOK Then
MkDir DirName
Else
MsgBox "Create folder cancelled. Folder not created."
Exit Sub
End If
Else
MsgBox "The folder already exists..." & Chr(10) & "Please check the directories using Windows Explorer.", vbOKOnly
Exit Sub
End If
RunCommand acCmdSaveRecord
Response = MsgBox(DirName, vbOKOnly)
Exit_cmbMkDir_Click:
Exit Sub
All works fine but i would like it to create a folder named from more than 1 field,
i assume its something like:
DirName = "F:\test\" & Left(Me!contract_number, 10 & Me!Client & Me!site)
but i dont think this is quite correct,
All help is grateful
Thanks
w0od0o
i have the following to create a directory
Dim DirName As String
Dim Response As String
DirName = "F:\test\" & Left(Me!contract_number, 10)
If Dir(DirName, vbDirectory) = "" Then
If MsgBox("OK to create folder!", vbOKCancel) = vbOK Then
MkDir DirName
Else
MsgBox "Create folder cancelled. Folder not created."
Exit Sub
End If
Else
MsgBox "The folder already exists..." & Chr(10) & "Please check the directories using Windows Explorer.", vbOKOnly
Exit Sub
End If
RunCommand acCmdSaveRecord
Response = MsgBox(DirName, vbOKOnly)
Exit_cmbMkDir_Click:
Exit Sub
All works fine but i would like it to create a folder named from more than 1 field,
i assume its something like:
DirName = "F:\test\" & Left(Me!contract_number, 10 & Me!Client & Me!site)
but i dont think this is quite correct,
All help is grateful
Thanks
w0od0o