I have a continuous form that I can make and create directories from. The final piece I am having issue with is coping the pictures based on the same form into the new folders.
Below is the code I tried to put together to loop through the form pick up the file name and copy to the already created folder.
Below is the code I tried to put together to loop through the form pick up the file name and copy to the already created folder.
Code:
Dim strFileName As String
Dim strFolderSource As String
Dim strFolderDest As String
strFolderSource = "C:\Project_Photos"
strFolderDest = " C:\Project_Photos\" & Me.[Crate UID] & "\"
strFolderDest2 = " C:\Project_Photos\" & Me.[Crate UID] & "\" & Me.[Internal Package UID] & "\"
strFileName = "Me.[Photo id]"
With Me.RecordsetClone
If .RecordCount Then
.MoveFirst
Do Until .EOF
Me.Bookmark = .Bookmark
If Len(Me.[Crate UID]) Then
FileCopy strFolderSource & "\" & strFileName, strFolderDest & "\" & strFileName
If Len(Me.[Internal Package UID]) Then
FileCopy strFolderSource & "\" & strFileName, strFolderDest2 & "\" & strFileName
End If
End If
.MoveNext
Loop
End If
End With
End Sub