Creating hyperlinks for MS Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi one and all. I have a very specific problem. How can I get a hyperlink,
and the text to show in the link – e.g. ‘click me’ – into a table
automatically? I need to import and link 70,000+ files which will be subject
of database reports. I can do this by having the text of the link there but
I must not have the path showing – just the file’s name.
Currently I have a good process that allows me to take the contents of a
folder (DIR /b >filenames.txt) which I use as the base point for a
concatenation process that joins the file path with the file name to create
the link. That then is imported to an Access table defined with a Hyperlink
field.
I want to be able to automate the process that I currently do manually –
that of editing the properties of the imported hyperlink record by record.
OK for a few per day but 70,000 is out of the question.
Any ideas would be very gratefully welcomed as this is exercising me greatly.
 
Yorkie in the Dales said:
Hi one and all. I have a very specific problem. How can I get a
hyperlink,
and the text to show in the link - e.g. 'click me' - into a table
automatically? I need to import and link 70,000+ files which will be
subject
of database reports. I can do this by having the text of the link there
but
I must not have the path showing - just the file's name.
Currently I have a good process that allows me to take the contents of a
folder (DIR /b >filenames.txt) which I use as the base point for a
concatenation process that joins the file path with the file name to
create
the link. That then is imported to an Access table defined with a
Hyperlink
field.
I want to be able to automate the process that I currently do manually -
that of editing the properties of the imported hyperlink record by record.
OK for a few per day but 70,000 is out of the question.
Any ideas would be very gratefully welcomed as this is exercising me
greatly.


Assuming you are storing the filename (minus a fixed folder path) in one
field and a hyperlink field in the other, then you could run an update query
to automatically form the hyperlink.

UPDATE MyTable SET MyHyperlink="Click File#C:\MyFolder\" & [MyFile] & "#"

While I think this is what you mean, you should always take a backup of your
database before running an update query like this.
 
Brian is right on target. The hyperlink field format is :
text to display # text to link # bookmark
bookmark is not needed, so the updae string provided should work well.
--
Hopefully helpful,


Brian Wilson said:
Yorkie in the Dales said:
Hi one and all. I have a very specific problem. How can I get a
hyperlink,
and the text to show in the link - e.g. 'click me' - into a table
automatically? I need to import and link 70,000+ files which will be
subject
of database reports. I can do this by having the text of the link there
but
I must not have the path showing - just the file's name.
Currently I have a good process that allows me to take the contents of a
folder (DIR /b >filenames.txt) which I use as the base point for a
concatenation process that joins the file path with the file name to
create
the link. That then is imported to an Access table defined with a
Hyperlink
field.
I want to be able to automate the process that I currently do manually -
that of editing the properties of the imported hyperlink record by record.
OK for a few per day but 70,000 is out of the question.
Any ideas would be very gratefully welcomed as this is exercising me
greatly.


Assuming you are storing the filename (minus a fixed folder path) in one
field and a hyperlink field in the other, then you could run an update query
to automatically form the hyperlink.

UPDATE MyTable SET MyHyperlink="Click File#C:\MyFolder\" & [MyFile] & "#"

While I think this is what you mean, you should always take a backup of your
database before running an update query like this.
 
Back
Top