crovella
New member
- Local time
- Today, 22:10
- Joined
- Sep 26, 2014
- Messages
- 9
I would like to make Folders from table, but when there is a folder the sub go to error 75
Is there resolution? :banghead:
Thank you very much
Private Sub Comando14_Click()
On Error GoTo ErrComando14_Click
Dim strSQL As String
Dim strPath As String
Dim rst As DAO.Recordset
strSQL = "SELECT cartella2 FROM tblDirectory WHERE ((cartella2) Is Not Null);"
strPath = "D:\Esempio\"
Set rst = CurrentDb.OpenRecordset(strSQL, dbOpenSnapshot)
If rst.RecordCount > 0 Then
rst.MoveFirst
Do While Not rst.EOF
MkDir strPath & rst("Cartella2")
rst.MoveNext
Loop
MsgBox "Operazione conclusa"
End If
ErrComando14_Click: MsgBox Err.Description & " - " & Err.Number
End Sub
Is there resolution? :banghead:
Thank you very much
Private Sub Comando14_Click()
On Error GoTo ErrComando14_Click
Dim strSQL As String
Dim strPath As String
Dim rst As DAO.Recordset
strSQL = "SELECT cartella2 FROM tblDirectory WHERE ((cartella2) Is Not Null);"
strPath = "D:\Esempio\"
Set rst = CurrentDb.OpenRecordset(strSQL, dbOpenSnapshot)
If rst.RecordCount > 0 Then
rst.MoveFirst
Do While Not rst.EOF
MkDir strPath & rst("Cartella2")
rst.MoveNext
Loop
MsgBox "Operazione conclusa"
End If
ErrComando14_Click: MsgBox Err.Description & " - " & Err.Number
End Sub