Opening a specific folder

Brando

Enthusiastic Novice
Local time
Today, 09:11
Joined
Apr 4, 2006
Messages
100
Thank you in advance for your time and help!

I have a command button on a form that has the following code:

Private Sub LibraryFile_Click()
Application.FollowHyperlink "\\Server1\data_admin\Library\2007\"
End Sub

This opens a folder containing separate folders for each record, which contain all the documents associated with a particular record.

I’m hoping that there is some code I can add that will use the job # in a textbox on the form to go one step further and open the folder associated with that particular record. Something like…

Private Sub LibraryFile_Click()
Application.FollowHyperlink "\\Server1\data_admin\Library\2007\[txtJob#]"
End Sub
 
It would be

Application.FollowHyperlink "\\Server1\data_admin\Library\2007\'" & Me![txtJob#] & "'"

also, I would HIGHLY suggest getting rid of the # sign in your field name. You should not use special characters in field, or object, names. It can only cause you pain and suffering at some point later.
 
Thank you!

That worked great. Although I had to remove the single quotes. Also, I didn't actually use the "#" in the name of the textbox. I was just testing you! ;)
 

Users who are viewing this thread

Back
Top Bottom