Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How create a folder on a server with the PK as the folder name

Avatar of SteveL13
SteveL13Flag for United States of America asked on
Microsoft Access
8 Comments1 Solution243 ViewsLast Modified:
I have a main form (the first form that opens with this onload event:

Private Sub Form_Load()
On Error GoTo Err_Form_Load

    Dim strAttachmentDirectory As String
   
    strAttachmentDirectory = DLookup("AttachmentDirectory", "LOCALtblDatabaseSetup")
    If Not Right(strAttachmentDirectory, 1) = "\" Then strAttachmentDirectory = strAttachmentDirectory & "\"
    TempVars!strAttachmentDirectory = strAttachmentDirectory

Exit_Form_Load:
    Exit Sub

Err_Form_Load:
    MsgBox "Error Number: " & Err.Number & vbCrLf & "Error Description: " & Err.Description & vbCrLf & "Error Source: " & Err.Source
    Resume Exit_Form_Load
End Sub

Which I believe is establishing the name of the folder I want on the C: drive.

But then within that established folder I want another folder to be setup using the PK on another form when a command button is clicked AND have an explorer window open to that newly established folder.  So there will end up being separate folders for each PK.  

If the folder was already setup by a previous onclick event I want the explorer window to open to it.

How can I do this?
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
Commented:
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answers