Hyperlink Assistance Required

G

Guest

I'm hoping someone can shed some light on a problem I'm having. I have a
form that is used to input data on tasks. The table that the form is linked
to has several fields used to store hyperlinks to source files pertaining to
these tasks. Instead of having the user type in the corresponding text boxes
on the form, I have placed command buttons that allow them to open the insert
hyperlink dialogue window, from which they navigate to the proper folder and
select the file they want to link to. The link is then stored in the proper
text box which has been set to invisible.

All of this is working fine, the problem lies in the fact that the database
has been split. The back end resides on a network drive while the mde file
resides on the user's "C:" drive. The issue I'm having difficulty with is
that when they click on the command button, the hyperlink window opens and is
defaulted to the folder that the mde resides in. I would like to set it so
that it opens to the folder that the back end is located on. I have tried
setting the hyperlink base to the correct location, but this had no effect.
Can anyone explain how to get around this situation?


--
Cheers

Klingon Coder

"Ancient Klingon Proverb - Act and you shall have dinner, Think and you
shall be dinner"
 
C

Cilla

Klingon said:
I'm hoping someone can shed some light on a problem I'm having. I have a
form that is used to input data on tasks. The table that the form is linked
to has several fields used to store hyperlinks to source files pertaining to
these tasks. Instead of having the user type in the corresponding text boxes
on the form, I have placed command buttons that allow them to open the insert
hyperlink dialogue window, from which they navigate to the proper folder and
select the file they want to link to. The link is then stored in the proper
text box which has been set to invisible.

All of this is working fine, the problem lies in the fact that the database
has been split. The back end resides on a network drive while the mde file
resides on the user's "C:" drive. The issue I'm having difficulty with is
that when they click on the command button, the hyperlink window opens and is
defaulted to the folder that the mde resides in. I would like to set it so
that it opens to the folder that the back end is located on. I have tried
setting the hyperlink base to the correct location, but this had no effect.
Can anyone explain how to get around this situation?

For a quick solution:

Under the File Database Properties Setting under the summary tab is the
option to enter a hyperlink base:. Enter the network path you wish to
start in.

When the use clicks the edit hyperlink option it will still look in the
database original path however if the user clicks the Browse for file
button on the dialog box (Last button next to look in) it will open to
the default settings in the database properties.
 
G

Guest

Hi Cilla, thanks for responding. As I mentioned in my original post I did
put the path in the hyperlink base. The problem is that the user never gets
to type in the textbox that stores the hyperlink as it is set to invisible.
The only way they can add a hyperlink is to click on the command button.
Here is the code I am using:

Private Sub cmdAnnexALink_Click()
Dim response, myString
On Error GoTo cmdAnnexAlink_Click_Error

If ValidLink(Me![txtAnnexAlink]) = False Then
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

response = MsgBox("Annex A file not found. Would you like to add
one now?", vbYesNo, "Add Annex A")

If response = vbYes Then
txtAnnexAlink.Visible = True
txtAnnexAlink.SetFocus
DoCmd.RunCommand acCmdInsertHyperlink
cmdAnnexALink.SetFocus
txtAnnexAlink.Visible = False
Hyper_Colours
Else
myString = "No"
End If
End If

exit_cmdAnnexAlink_Click:
Exit Sub

cmdAnnexAlink_Click_Error:
If Err <> 2501 Then
MsgBox Err & ": " & Err.Description
Resume exit_cmdAnnexAlink_Click
End If
End Sub

What I need is a way to point the hyperlink window to the backend so that
the user doesn't have to search for the network drive and then the
appropriate folder. The irony of it all is I have a function that will
search the back end for a specific file, but not just a directory, and I
haven't been able to figure out how to utilize that ability to work here.
Any other suggestions/ideas?

--
Cheers

Klingon Coder

"Ancient Klingon Proverb - Act and you shall have dinner, Think and you
shall be dinner"
 
G

Guest

Hi Cilla, thanks for responding. As I mentioned in my original post I did
put the path in the hyperlink base. The problem is that the user never gets
to type in the textbox that stores the hyperlink as it is set to invisible.
The only way they can add a hyperlink is to click on the command button.
Here is the code I am using:

Private Sub cmdAnnexALink_Click()
Dim response, myString
On Error GoTo cmdAnnexAlink_Click_Error

If ValidLink(Me![txtAnnexAlink]) = False Then
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

response = MsgBox("Annex A file not found. Would you like to add
one now?", vbYesNo, "Add Annex A")

If response = vbYes Then
txtAnnexAlink.Visible = True
txtAnnexAlink.SetFocus
DoCmd.RunCommand acCmdInsertHyperlink
cmdAnnexALink.SetFocus
txtAnnexAlink.Visible = False
Hyper_Colours
Else
myString = "No"
End If
End If

exit_cmdAnnexAlink_Click:
Exit Sub

cmdAnnexAlink_Click_Error:
If Err <> 2501 Then
MsgBox Err & ": " & Err.Description
Resume exit_cmdAnnexAlink_Click
End If
End Sub

What I need is a way to point the hyperlink window to the backend so that
the user doesn't have to search for the network drive and then the
appropriate folder. The irony of it all is I have a function that will
search the back end for a specific file, but not just a directory, and I
haven't been able to figure out how to utilize that ability to work here.
Any other suggestions/ideas?

--
Cheers

Klingon Coder

"Ancient Klingon Proverb - Act and you shall have dinner, Think and you
shall be dinner"
 
G

Guest

Hi Cilla, thanks for responding. As I mentioned in my original post I did
put the path in the hyperlink base. The problem is that the user never gets
to type in the textbox that stores the hyperlink as it is set to invisible.
The only way they can add a hyperlink is to click on the command button.
Here is the code I am using:

Private Sub cmdAnnexALink_Click()
Dim response, myString
On Error GoTo cmdAnnexAlink_Click_Error

If ValidLink(Me![txtAnnexAlink]) = False Then
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

response = MsgBox("Annex A file not found. Would you like to add
one now?", vbYesNo, "Add Annex A")

If response = vbYes Then
txtAnnexAlink.Visible = True
txtAnnexAlink.SetFocus
DoCmd.RunCommand acCmdInsertHyperlink
cmdAnnexALink.SetFocus
txtAnnexAlink.Visible = False
Hyper_Colours
Else
myString = "No"
End If
End If

exit_cmdAnnexAlink_Click:
Exit Sub

cmdAnnexAlink_Click_Error:
If Err <> 2501 Then
MsgBox Err & ": " & Err.Description
Resume exit_cmdAnnexAlink_Click
End If
End Sub

What I need is a way to point the hyperlink window to the backend so that
the user doesn't have to search for the network drive and then the
appropriate folder. The irony of it all is I have a function that will
search the back end for a specific file, but not just a directory, and I
haven't been able to figure out how to utilize that ability to work here.
Any other suggestions/ideas?


--
Cheers

Klingon Coder

"Ancient Klingon Proverb - Act and you shall have dinner, Think and you
shall be dinner"
 
G

Guest

Hi Cilla, thanks for responding. As I mentioned in my original post I did
put the path in the hyperlink base. The problem is that the user never gets
to type in the textbox that stores the hyperlink as it is set to invisible.
The only way they can add a hyperlink is to click on the command button.
Here is the code I am using:

Private Sub cmdAnnexALink_Click()
Dim response, myString
On Error GoTo cmdAnnexAlink_Click_Error

If ValidLink(Me![txtAnnexAlink]) = False Then
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

response = MsgBox("Annex A file not found. Would you like to add
one now?", vbYesNo, "Add Annex A")

If response = vbYes Then
txtAnnexAlink.Visible = True
txtAnnexAlink.SetFocus
DoCmd.RunCommand acCmdInsertHyperlink
cmdAnnexALink.SetFocus
txtAnnexAlink.Visible = False
Hyper_Colours
Else
myString = "No"
End If
End If

exit_cmdAnnexAlink_Click:
Exit Sub

cmdAnnexAlink_Click_Error:
If Err <> 2501 Then
MsgBox Err & ": " & Err.Description
Resume exit_cmdAnnexAlink_Click
End If
End Sub

What I need is a way to point the hyperlink window to the backend so that
the user doesn't have to search for the network drive and then the
appropriate folder. The irony of it all is I have a function that will
search the back end for a specific file, but not just a directory, and I
haven't been able to figure out how to utilize that ability to work here.
Any other suggestions/ideas?


--
Cheers

Klingon Coder

"Ancient Klingon Proverb - Act and you shall have dinner, Think and you
shall be dinner"
 
C

Cilla

Klingon said:
Hi Cilla, thanks for responding. As I mentioned in my original post I did
put the path in the hyperlink base. The problem is that the user never gets
to type in the textbox that stores the hyperlink as it is set to invisible.
The only way they can add a hyperlink is to click on the command button.
Here is the code I am using:

Private Sub cmdAnnexALink_Click()
Dim response, myString
On Error GoTo cmdAnnexAlink_Click_Error

If ValidLink(Me![txtAnnexAlink]) = False Then
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

response = MsgBox("Annex A file not found. Would you like to add
one now?", vbYesNo, "Add Annex A")

If response = vbYes Then
txtAnnexAlink.Visible = True
txtAnnexAlink.SetFocus
DoCmd.RunCommand acCmdInsertHyperlink
cmdAnnexALink.SetFocus
txtAnnexAlink.Visible = False
Hyper_Colours
Else
myString = "No"
End If
End If

exit_cmdAnnexAlink_Click:
Exit Sub

cmdAnnexAlink_Click_Error:
If Err <> 2501 Then
MsgBox Err & ": " & Err.Description
Resume exit_cmdAnnexAlink_Click
End If
End Sub

What I need is a way to point the hyperlink window to the backend so that
the user doesn't have to search for the network drive and then the
appropriate folder. The irony of it all is I have a function that will
search the back end for a specific file, but not just a directory, and I
haven't been able to figure out how to utilize that ability to work here.
Any other suggestions/ideas?


--
Cheers

Klingon Coder

"Ancient Klingon Proverb - Act and you shall have dinner, Think and you
shall be dinner"


Cilla said:
For a quick solution:

Under the File Database Properties Setting under the summary tab is the
option to enter a hyperlink base:. Enter the network path you wish to
start in.

When the use clicks the edit hyperlink option it will still look in the
database original path however if the user clicks the Browse for file
button on the dialog box (Last button next to look in) it will open to
the default settings in the database properties.
Hi,

I took you code and placed it into one of my forms. (Modified the form
to make it work of course) and got the hyperlink dialog box when the
field was null. It gave me the same choice buttons on the hyperlink
dialog box and I could click the Browse for File button which brought
me to the hyperlink base I have set in the database properties. It
seemed to work fine for me.

You could also create your own browser to act the same way as the
hyperlink and place the default path within the brower you created. If
you want the code let me know
 
G

Guest

Actually I would very much like the code for that.

But I do have a question, is your front end located in a different location
than the backend? Because we never noticed the problem until we split the
database and relocated the front end from the server to the user's PC
..
--
Cheers

Klingon Coder

"Ancient Klingon Proverb - Act and you shall have dinner, Think and you
shall be dinner"
 
C

Cilla

Klingon said:
Actually I would very much like the code for that.

But I do have a question, is your front end located in a different location
than the backend? Because we never noticed the problem until we split the
database and relocated the front end from the server to the user's PC
.
--
Cheers

Klingon Coder

"Ancient Klingon Proverb - Act and you shall have dinner, Think and you
shall be dinner"

Yes I am using a split database. Send me you email to
(e-mail address removed) and I will send you the code for the browser
 
C

Cilla

Hi,

Just send me your email address to (e-mail address removed) and i will
send you the code. it is rather lengthy
 

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

Similar Threads

Still seeking help 2
Access 2003 File Search / Hyperlink difficulties 7
Previous Record on Escape 1
EOF Issue 5
Return to previous record on undo 1
Hyperlink 3
Hide .ldb 3
Question regarding linked table 3

Top