B
Blakey300
Hi
I am using access 2007 and i have the following code:
Private Sub Command160_Click()
Dim strDesktop As String
Dim strSubfolder As String
strDesktop = "C:\Users\Dave Blake\Documents\Keibudo Karate\Student Documents\"
strSubfolder = Me![LastName] & " " & Me![FirstName]
If Len(Dir(strDesktop & strSubfolder, vbDirectory)) > 0 Then
MsgBox "ERROR: THE FOLDER ALREADY EXISTS"
Else
MkDir strDesktop & strSubfolder
End If
End Sub
This code is attached to a button on my form, once i click the button it
checks to see if there is a folder for that record, and if not it creates
one, which works great however is it possible to change this so that it will
do this for all records on the form and not just the current one.
Sorry I am a bit of a thicko when it comes to VBA coding so any help would
be appricated.
Regards
Dave
I am using access 2007 and i have the following code:
Private Sub Command160_Click()
Dim strDesktop As String
Dim strSubfolder As String
strDesktop = "C:\Users\Dave Blake\Documents\Keibudo Karate\Student Documents\"
strSubfolder = Me![LastName] & " " & Me![FirstName]
If Len(Dir(strDesktop & strSubfolder, vbDirectory)) > 0 Then
MsgBox "ERROR: THE FOLDER ALREADY EXISTS"
Else
MkDir strDesktop & strSubfolder
End If
End Sub
This code is attached to a button on my form, once i click the button it
checks to see if there is a folder for that record, and if not it creates
one, which works great however is it possible to change this so that it will
do this for all records on the form and not just the current one.
Sorry I am a bit of a thicko when it comes to VBA coding so any help would
be appricated.
Regards
Dave