Hyperlinking to Word Files

  • Thread starter Thread starter MikeP125
  • Start date Start date
M

MikeP125

In my database, employees have a unique identifier, their initials plus a 6
digit number. For example Alan Anderson is AA123456.

On my server, there is one file folder with Word documents that contain
employee reports. Each employee may have several reports but they all begin
with the employee identifier, but end with a few different characters such
that each Word document has a unique name. For example, Alan Anderson may
have three files with the names AA123456M.01, AA123456E.01, AA123456M.02.

I need to create on an Access form, a list that links any Word file in the
file folder that begins with AA123456 to my Access database so that I can
open each form that pertains to that employee by clicking on a hyperlink. I
am not even sure where to start. Any suggestions?
Thanks...Mike
 
Your solution will require some coding in VBA. To get started, you
will need to be able to load the contents of the directory into a
table, temporary table or an array based on a file name criteria (File
Name Like [UserCode]*) Then you will need to decide how to display
this to the user. The simplest would be to show the resulting files in
a listbox that the user can select from.
If you are not familiar with coding access forms, take it one step at
a time; first get code to collect the file names then work on
displaying the files so the user can select a file lastly work on
opening the file based on the user selection.

A simpler solution might be to hook into the windows open file dialog
box which you can pass criteria to directly. - Google for Windows
OpenFIle Dialog in Access (I use this method often)

HTH
 
Back
Top