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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DOS naming for Access?

Status
Not open for further replies.

GF2002

Technical User
Dec 13, 2002
5
US
I have Microsoft Access 97 and I am trying to call Word documents from my program by using the text that would appear in a hyperlink path. Is it mandatory that I use DOS naming for calling these documents? Or, is there a way that I can use the actual text that would appear on a hyperlink? Note: The path is stored in a table on my database as a text field. These hyperlinks are stored on multiple databases without overlapping. I had previously tried storing the information as a hyperlink field, but when I use my createtable method, as a dbhyperlink instead of dbtext, it will not accept it, so I am writing a function to convert it before another program grabs it. Any ideas?

Thanks!
 
Hi GF2002 This is how to create a table with a Hyperlink field:
Sub CreateMyTable()
Dim dbs As Database, tdf As TableDef, fld As Field
Set dbs = CurrentDb
Set tdf = dbs.CreateTableDef("MyHyperlinkTable") 'replace with your own table name
With tdf
.Fields.Append .CreateField("ExampleField1", dbText) 'create your non-HyperlinkField's first
.Fields.Append .CreateField("ExampleField2", dbText)
.Fields.Append .CreateField("ExampleField3", dbText)
End With
Set fld = tdf.CreateField("MyHyperlinkField", dbMemo) 'create your HyperLink field, must be set as Memo
fld.Attributes = dbHyperlinkField 'then set attributes to dbHyperlinkField
tdf.Fields.Append fld
dbs.TableDefs.Append tdf
dbs.Close
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top