A
Avais
This will work,
Bacause of the space in the folder names Access creates
the first folder "subfolder". Work around would be to
concatenate all words in the folder name, see below.
Use a variable instead of the "ProjectNumber100"
Avais
Function CreateFolder()
Dim cstrLocalPath As String
cstrLocalPath = "C:\subfolder" & "1\subfolder" & "2
\subfolder" & "3\" & "ProjectNumber100" & "\"
Shell ("cmd /c md " & cstrLocalPath)
End Function
the value of the records ProjectNumber (text) field. So
far, the code I have in the AfterInsert property of my
entry form (shown below) should create a folder
named "NewFolder". But nothing happens -- no errors or
anything. Ultimately, I need to know how to change the
code from "NewFolder" to a variable equal to the field
ProjectNumber. Possible?
\NewFolder")
Bacause of the space in the folder names Access creates
the first folder "subfolder". Work around would be to
concatenate all words in the folder name, see below.
Use a variable instead of the "ProjectNumber100"
Avais
Function CreateFolder()
Dim cstrLocalPath As String
cstrLocalPath = "C:\subfolder" & "1\subfolder" & "2
\subfolder" & "3\" & "ProjectNumber100" & "\"
Shell ("cmd /c md " & cstrLocalPath)
End Function
folder on the network. The folder name will be equal to-----Original Message-----
In my database, every new record needs to create a new
the value of the records ProjectNumber (text) field. So
far, the code I have in the AfterInsert property of my
entry form (shown below) should create a folder
named "NewFolder". But nothing happens -- no errors or
anything. Ultimately, I need to know how to change the
code from "NewFolder" to a variable equal to the field
ProjectNumber. Possible?
\\servername\subfolder 1\subfolder 2\subfolder 3Private Sub Form_AfterInsert()
'Create a new subfolder called NewFolder
Shell ("c:\winnt\system32\cmd.exe /c md
\NewFolder")