hi there, i have this vba code which allows the user, through the use of a macro, create a folder within a certain directory using the unique ID number of the record as the folder name. It will not create duplicates. This works great on one pc but not another, which has the same directory available to it (the database and the folders created are stored on a shared drive within the network) also the computers are running the same version of Access so im not sure what the issue may be, please help!
here is the code used:
Private Sub MCRfolder_Click()
Dim strPath As String
strPath = "Z:\AMSS Database\Learner Certificates PDF\" & Me.txtLearnerID
If Len(Dir(strPath, vbDirectory)) = 0 Then
MkDir strPath
End If
Shell "explorer.exe " & strPath, vbNormalFocus
End Sub
here is the code used:
Private Sub MCRfolder_Click()
Dim strPath As String
strPath = "Z:\AMSS Database\Learner Certificates PDF\" & Me.txtLearnerID
If Len(Dir(strPath, vbDirectory)) = 0 Then
MkDir strPath
End If
Shell "explorer.exe " & strPath, vbNormalFocus
End Sub
Last edited: