Hey everyone, I am new to Access and I have managed to somehow get all of my buttons to work except one, my button that makes folders. I can get it to make folder where I want it, but I can not get it to name the folder based off of a certain field on my form. I also need it to copy a folder template each time it goes to make a new folder, but was trying to get this part to work first. Any advice would be great. I feel like I am missing something very simple in the code and I have searched for a few days and watched multiple videos with no success.
here is the code I am currently using:
Code:
Private Sub Command452_Click()
Const FOLDER_EXISTS = 75
Dim strFolderPath As String
strFolderPath = "C:\Access Pipeline\Projects"
On Error Resume Next
MkDir "C:\Access Pipeline\Projects"
Err.Clear
MkDir "C:\Access Pipeline\Projects\" & "Project_Name"
Err.Clear
MkDir strFolderPath
Select Case Err.Number
Case 0
' no error
Case FOLDER_EXISTS
' folder exists so open it
Application.FollowHyperlink strFolder
Case Else
' unknown error so inform user
MsgBox Err.Description, vbExclamation, "Error"
End Select
End Sub