Buttons in visual basic

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

Anyone know if it's possible to have a button in the form
which opens a word document related to the record you are
currently viewing?
 
Thanks for your help, this works perfectly.

Now, is it possible to have a button which lets you
select the file to associate with the record, and from
then on the file is automatically associated with the
record?

Cheers,
Michael

-----Original Message-----
1. Make sure the recordsource includes a field with the full path of the
file (for this example: FullDocPath).
2. Create a button called FileLinker. Set the onClick to "[Event Procedure]"
Paste this in the form module:
'Begin Code
Private Sub FileLinker_Click()
With Me!FileLinker
.HyperlinkAddress = Me!FullDocPath
.Hyperlink.Follow
.HyperlinkAddress = ""
End With
End Sub
'End Code


Cheers,
Barron

Michael said:
Anyone know if it's possible to have a button in the form
which opens a word document related to the record you are
currently viewing?
.
 
Back
Top