G
Guest
I am confronted with problem of successfully extending a hyperlink when
adding a record via recordset manipulation. I have a field in a table that
is set as a hyperlink, and would like for it to have a complete hyperlink
when row inserted. At present, when the record is inserted the Hyperlink
Address property is not populated.
Here is my code:
I would like the Hyperlink address to be the same as the assigned rst!Link
which is "C:\MyDocuments\Test.doc"
Public Sub AddLink()
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim strAddress As String
Set db = CurrentDb
Set rst = db.OpenRecordset("Table1", dbOpenDynaset)
rst.AddNew
rst!Id = "3"
rst!Link = "C:\MyDocuments\Test.doc"
rst.Update
rst.Close
Set rst = Nothing
End Sub
Any help would be appreciated. Thanks
adding a record via recordset manipulation. I have a field in a table that
is set as a hyperlink, and would like for it to have a complete hyperlink
when row inserted. At present, when the record is inserted the Hyperlink
Address property is not populated.
Here is my code:
I would like the Hyperlink address to be the same as the assigned rst!Link
which is "C:\MyDocuments\Test.doc"
Public Sub AddLink()
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim strAddress As String
Set db = CurrentDb
Set rst = db.OpenRecordset("Table1", dbOpenDynaset)
rst.AddNew
rst!Id = "3"
rst!Link = "C:\MyDocuments\Test.doc"
rst.Update
rst.Close
Set rst = Nothing
End Sub
Any help would be appreciated. Thanks