How to create Folder exist from TABLE and Syncing in Data Form (1 Viewer)

Pat Hartman

Super Moderator
Staff member
Local time
Today, 13:56
Joined
Feb 19, 2002
Messages
43,296
No idea ! how I call code inside the loop.
I said --- Move the code that creates the folders so that it is between the Do and the Loop rather than after the loop finishes.

If you want to call the code, Create a separate procedure and call it from INSIDE the loop but you need to pass it the value from the loop if you want to do it this way.
 

smtazulislam

Member
Local time
Today, 20:56
Joined
Mar 27, 2020
Messages
806
I said --- Move the code that creates the folders so that it is between the Do and the Loop rather than after the loop finishes.

If you want to call the code, Create a separate procedure and call it from INSIDE the loop but you need to pass it the value from the loop if you want to do it this way.
okay . I will try...
 

smtazulislam

Member
Local time
Today, 20:56
Joined
Mar 27, 2020
Messages
806
if I put the code inside the loop then CREATE all folders under the MASTER FILE folder.
not separated create a record value under the record value

Code:
' create sub-folder under the main folder
    Set fs = CreateObject("Scripting.FileSystemObject")
   
    If fs.FolderExists(SubFolderPath) Then
    Else
        fs.CreateFolder (SubFolderPath)
    End If
   
' create current folder under the subfolder
    Do Until rst.EOF
        rstData = rst!FolderName
        fs.CreateFolder (SubFolderPath & "\" & rstData)
        rst.MoveNext
    Loop
    rst.Close
    MsgBox "Done "
End Sub
Capture.PNG
 
Last edited:

smtazulislam

Member
Local time
Today, 20:56
Joined
Mar 27, 2020
Messages
806
Can some one help me to auto uploaded the Image from my table location ?
My app is split.
Capture.PNG

Note :
if my FileType is PDF then need only Path by EmployeeID
 

Users who are viewing this thread

Top Bottom