SAME ROCKIN' SERVICE, COOL NEW NAME!

                        and they love us!

We are your Microsoft Access Database Experts

AKA: TopDesk Applications, Since 1994

Quick Code Pros
Made in America

If you need to setup a customer with many sub-folders to keep track of various documents, here is a cool procedure you can add to your Access CRM database. (Link to free access database template below!)


***NOTES: ***

  1. You will need to set a reference to Microsoft Office XX Object Library
  2. You will need an unbound field on your customers form titled "customerpath".
  3. You will need an unbound field on your customers form titled "txtfolder".



‘First we test for nulls and check that the directory doesn’t already exist.

If Not IsNull(Me.CompanyName) And Not IsNull(Me.txtFolder) And Len(Dir(Forms!customers!customerpath, vbDirectory)) = 0 Then
MkDir Forms!customers!customerpath ‘Create the main directory.

‘Create the folders that we need for each customer, you can add/modify/delete as needed. ***IDEA: if you have different types of customers and require different types of folders, you could incorporate a few combo boxes, to choose the file names and reference them as MkDir customerpath & me.filename1 MkDir customerpath &me.filename2 and so forth.

MkDir customerpath & "\Proposals"
MkDir customerpath & "\Invoices"
MkDir customerpath & "\Specs"

‘Deal with blank company name (Can’t make the directory without it)
ElseIf IsNull(Me.CompanyName) Then
MsgBox "Please enter a company name"
Me.CompanyName.SetFocus

‘Deal with blank directory location (Can’t make the directory without it)
ElseIf IsNull(Me.txtFolder) Then
MsgBox "Please choose the folder where you'd like to create your files"
Me.txtFolder.SetFocus

‘Deal with a directory that already exists
ElseIf Len(Dir(Forms!customers!customerpath, vbDirectory)) > 0 Then
MsgBox "This directory already exists"
Exit Sub

End If


Get your free Access template (Create Directory and Folders) HERE.