Modify_inc
Registered User.
- Local time
- Today, 06:26
- Joined
- Mar 25, 2013
- Messages
- 20
Hey everyone!
I'm pretty new to using Access 2010, and have created a workable database for tracking my client records. Only problem is I didn't realize that using the attachment field for my PDFs for each client would result in me reaching the 2GB limit of Access. Minor over-site, I know. I'm trying to transfer the files from each record (client) to a folder on my server, relative to the client's name.
Currently I'm using this code listed below to open the folder of the client I'm viewing in the Form and thus allowing me to view the PDFs associated with that client.
I have over 900 clients that I need to create these folders for, and currently I just created three client folders manually for testing with the below code. This works, but my objective is to create the folders automatically from the Form, only if the client folder does not already exist, and if possible, transfer the attached files to the folder when it is created for the client. If the latter complicates things, I can manage to transfer the files to each folder manually over time. I just need to free some space in my DB so I can continue to use it.
Here is the code I'm using at the moment, (not mine, found on the net, although altered for my DB):
I assume this task to be somewhat in depth or complicated to some extent. If someone knowledgeable in this area can provide me a starting point to solving this on my on, I would be grateful either way.
I truly want to learn how to code or at minimum learn how to do some of these tasks without requiring so much assistance from others. I understand macros are suppose to be easier than VBA and that it uses a subset of VBA code. But when I open the macro editor in Access 2010, I'm lost.
Sincerely
Mike
I'm pretty new to using Access 2010, and have created a workable database for tracking my client records. Only problem is I didn't realize that using the attachment field for my PDFs for each client would result in me reaching the 2GB limit of Access. Minor over-site, I know. I'm trying to transfer the files from each record (client) to a folder on my server, relative to the client's name.
Currently I'm using this code listed below to open the folder of the client I'm viewing in the Form and thus allowing me to view the PDFs associated with that client.
I have over 900 clients that I need to create these folders for, and currently I just created three client folders manually for testing with the below code. This works, but my objective is to create the folders automatically from the Form, only if the client folder does not already exist, and if possible, transfer the attached files to the folder when it is created for the client. If the latter complicates things, I can manage to transfer the files to each folder manually over time. I just need to free some space in my DB so I can continue to use it.
Here is the code I'm using at the moment, (not mine, found on the net, although altered for my DB):
Code:
Private Sub Command1043_Click()
On Error GoTo Err_cmdExplore_Click
Dim stAppName As String
stAppName = "C:\Windows\explorer.exe D:\Clients\" & Me.txtContactName & "\"
Call Shell(stAppName, 1)
If Dir("D:\Clients\" & Me.txtContactName & "\") = "" Then
MsgBox "Folder not found."
Else
Exit_cmdExplore_Click:
Exit Sub
Err_cmdExplore_Click:
MsgBox Err.Description
Resume Exit_cmdExplore_Click
End If
End Sub
I truly want to learn how to code or at minimum learn how to do some of these tasks without requiring so much assistance from others. I understand macros are suppose to be easier than VBA and that it uses a subset of VBA code. But when I open the macro editor in Access 2010, I'm lost.
Sincerely
Mike