Tim Bedborough
Registered User.
- Local time
- Today, 05:28
- Joined
- Nov 16, 2015
- Messages
- 42
Hi all, usual apology in case this has been done before (I'm sure it has!).
I have a recordset (the table is called tblJobTitle) and I want to loop through all the records and create a windows folder (MkDir) in my P directory with the name of the field/control [JobTitle].
This is what I have:
Private Sub Test_Click()
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("SELECT * FROM tblJobTitle")
Do Until rs.EOF
MkDir "P:" & Me.JobTitle
rs.MoveNext
Loop
End Sub
It will create the first record but then errors with a run time error 75 saying Path/File access error.
I have tried searching the blogs and the above looks OK to me but obviously not.
Help please, thanks.
I have a recordset (the table is called tblJobTitle) and I want to loop through all the records and create a windows folder (MkDir) in my P directory with the name of the field/control [JobTitle].
This is what I have:
Private Sub Test_Click()
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("SELECT * FROM tblJobTitle")
Do Until rs.EOF
MkDir "P:" & Me.JobTitle
rs.MoveNext
Loop
End Sub
It will create the first record but then errors with a run time error 75 saying Path/File access error.
I have tried searching the blogs and the above looks OK to me but obviously not.
Help please, thanks.