Need Folder Path

D

Don Stone

Greetings--

I am working an A2003 database using A2007. In VBA, I have the need to
fetch the full path of a folder which is on either the current computer or
possibly a computer on the LAN. I have been doing a major search on the
internet with little success. The best that I have located is for me to use
the "Application.FileDialog(msoFileDialogFolderPicker)" dialog. The browser
dialog seems to work fine and enables me to find the folder. However, I am
unable to see or use any return value from the dialog which should be the
full path to the selected folder.

Please point me to the code that will give me the path.

Thank you very much for the help!

Don
 
R

ryguy7272

This may work for you:
Behind the Form:
Option Compare Database
Private Sub Command0_Click()
Call GetDBPath
End Sub

With a TextBox, named Texto on the Form:
Option Compare Database
Public Function GetDBPath() As String
Forms!Form1!Text0 = CurrentProject.path & "\"
End Function

This secodn part of the code goes in a Module.

HTH,
Ryan---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top