Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

saving hyperlinks in a table 1

Status
Not open for further replies.
Jun 17, 2004
50
0
0
GB
I have created a database to log requests for work for our team. i would like to let users "attach" documents to each request record. I would liek to be able to associate hyperlinks for each request.

i have created a table with a field of data type hyperlink. To select an appropriate file I have used the common open dialog API. So now I have the pathname and filename in a string but i would like to save it as a hyperlink in the table I have created.

I am using the following bit of code;

rst.Open "select * from tblAttach where 1=0", cnn, adOpenKeyset, adLockPessimistic
rst.AddNew
strAttach = ahtCommonFileOpenSave(InitialDir:="C:\", Filter:=strFilter, FilterIndex:=3, Flags:=lngFlags)

rst.Fields("req_id").Value = 1
rst.Fields("file_hyperl").Value = ??????
rst.Update

The field file_hyperl is a hyperlink datatype bu I cannot figure out how to save it in the table.

Can someone help?
 
Have a look at the HyperlinkPart method to see how to play with the # character.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top