good afternoon,
I have been messing with this code since this morning and still can not get it to work.
Code:
Private Sub Command143_Click()
On Error GoTo err_Procedure
Dim pathneeded As String
pathneeded = "\digitalfiles\" & Me.[Last Name] & "_" & Me.[First Name] & "_" & Me.[ID]"\"
If Dir(pathneeded, vbDirectory) <> vbNullString Then
KATALOG = Dir(pathneeded, vbDirectory)
Shell = ("explorer.eve pathneeded")
Else
MkDir "pathneeded"
Msg = "New Folder Created. please reclick command"
End If
err_Procedure:
Msg = Err.Number & "_" & Err.Description & " " & Err.Source
MsgBox Msg
End Sub
Now this thing sucks to say the least. I have had several problems in creating this and now it looks like crap.
First,
on the string Pathneeded. you will see \digitalfiles\. My database is located on a server drive, This drive letter changes depending on who mapped that particular drive. The database is located in a folder called (database) and the folder inside is (digital files). I want this to check and see if a folder based on their [Last name] [First Name] [ID].
Then,
If it exists I want it to open that location.
else
Make it
The idea is to see if the folder is there then either make the folder and then open it or open it.
I pretty sure the whole problem is in the string trying to use the current folder but making a new folder inside of a sub folder in the folder the database resides
Ideas PLEASE?