Open File based on parameter pass

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

Guest

I would like to have a hyperlink to open a file based on the record primary
key the user is currently sitting on. Can this be done?
i.e. on Record No 3456 open File in a specified directory file name 3456.doc

Thanks in advance
 
Hi Shawna,

Assuming the record is being displayed in a form and the primary key
being displayed in a textbox called txtPK, try something like this in
the Click() event procedure of a commandbutton:

Application.FollowHyperlink "C:\Folder\" & Me.txtPK.Value & ".doc"
 
Back
Top