Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attaching a Folder

Status
Not open for further replies.

deesheeha

Programmer
Jul 28, 2006
38
IE
Hello!

Im currently coding a database and a form i have a textbox called AttachedFolder and a button called btnFolder...

Basically, i know you can bring up the browse box using the

DoCmd.RunCommand acCmdInsertHyperlink

but that inserts a hyperlink....

Im looking to be able to attach a folder!

Can anyone help with this??
 

Attach the folder with its contents????

Or store the path?

BTW forum705 is most appropriate for Access VBA
 
You may use this function:
Code:
Function PickFolder(strStartDir As Variant) As String
Dim SA As Object, f As Object
Set SA = CreateObject("Shell.Application")
Set f = SA.BrowseForFolder(0, "Choose a folder", 16 + 32 + 64, strStartDir)
If (Not f Is Nothing) Then
  PickFolder = f.Items.Item.path
End If
Set f = Nothing
Set SA = Nothing
End Function

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top