Implementing hyperlinking in SQL. (Linked tables to Access frontend.)

N

noservice

I have recently uploaded my access 2003 tables to an SQL server. I've
modified most of the code and everything is working properly except
for the hyperlink fields. I have several fields which are references
(links) to files on our server. It worked fine with the
CmdInsertHyperlink in access, but now that we have linked tables, I
get this error message;

"2046: The command or action 'InsertHyperlink' isn't available now."

I believe I need to modify my code with Insert statements, but I am
just now teaching myself the intricacies of SQL. Would anyone here
have any advice for accomplishing this with linked tables?

Below is a code sample to illustrate how I'm currently doing this:

Private Sub ContractLink_Click()

Dim Response, MyString

On Error GoTo ContractLink_Click_Error

If ValidLink(Me.Contract) = False Then

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

If Response = vbYes Then ' User choose Yes.

Contract.Visible = True ' text box to hold hyperlink

Contract.SetFocus

DoCmd.RunCommand acCmdInsertHyperlink

ContractLink.SetFocus

Contract.Visible = False

Else ' User choose No.

MyString = "No" ' Perform some action.

Contract.Visible = False

ContractLink.SetFocus

End If

End If



exit_ContractLink_Click:

Exit Sub

ContractLink_Click_Error:

If Err <> 2501 Then

MsgBox Err & ": " & Err.Description

Resume exit_ContractLink_Click

If (Err = conErrDoCmdCancelled) Then
Resume Next
End If

End If

End Sub


Also, if you know of any good books that I can reference for further
learning, that would be most appreciated.


Sincerely,

M. Carrizales
 
N

noservice

I hope this is the correct group, as I really need help solving this
issue. Thank you in advance to whomever assists me, or at the very
least, points me in the right direction.
 

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