I have an Access 2003 database received from someone else with code behind the OnClick event of a button on a form as follows:
Dim MyString As String
MyString = "\\MySrvrName\MyFolder\" & Mid(cboLastName, 1, 1) & "\" & Forms![frmMyForm]!cboLastName & ", " & Forms![frmMyForm]!cboFirstName.Column(1) & " " & DateofBirth
Application.FollowHyperlink MyString
When the button is clicked, Windows Explorer is activated and finds the folder named, for example, "Public, Joe 1-1-1983", based on values on the form.
I understand that the string MyString is built from the values on the form being added to the string "\\MySrvrName\MyFolder\" but I'm not completely sure how the Application.FollowHyperLink method works to open Windows Explorer and find the folder. Here's what puzzles me the most: (1) how is it determined that Windows Explorer is the application to use? (2) How is the expression "Application." functioning in the code? I think that "Application." refers to the active Microsoft Access application and that "Application" refers to an expression that returns one of the objects in the Applies To list of the HyperLink method. But exactly what function it is performing in this code is a bit vague to me.
I'm not that familiar with the FollowHyperLink method and wonder if someone can point me to where I can get a free (I have a low budget) explanation or if someone can explain it to me.
Thanks much!
Dim MyString As String
MyString = "\\MySrvrName\MyFolder\" & Mid(cboLastName, 1, 1) & "\" & Forms![frmMyForm]!cboLastName & ", " & Forms![frmMyForm]!cboFirstName.Column(1) & " " & DateofBirth
Application.FollowHyperlink MyString
When the button is clicked, Windows Explorer is activated and finds the folder named, for example, "Public, Joe 1-1-1983", based on values on the form.
I understand that the string MyString is built from the values on the form being added to the string "\\MySrvrName\MyFolder\" but I'm not completely sure how the Application.FollowHyperLink method works to open Windows Explorer and find the folder. Here's what puzzles me the most: (1) how is it determined that Windows Explorer is the application to use? (2) How is the expression "Application." functioning in the code? I think that "Application." refers to the active Microsoft Access application and that "Application" refers to an expression that returns one of the objects in the Applies To list of the HyperLink method. But exactly what function it is performing in this code is a bit vague to me.
I'm not that familiar with the FollowHyperLink method and wonder if someone can point me to where I can get a free (I have a low budget) explanation or if someone can explain it to me.
Thanks much!