[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 196
  • Last Modified:

using links in MSaccess command button

In MSacess 2003 I have command button on the for and I need add a link to the button , the link will refer to a document in the network so that when a user clicks on the button it will open the document referred to.

Thanks
0
jskfan
Asked:
jskfan
2 Solutions
 
Rey Obrero (Capricorn1)Commented:
private sub cmdButton_click()

dim sApp as string
sApp="\\servername\foldername\fileName.doc"

followhyperlink sapp

end sub

or you can use the shell

example

strLoc="\\servername\foldername\"
xlFile="MyExcel"
stAppName = "Excel.exe " & Chr(34) & strLoc & xlFile & ".xls"
    Call Shell(stAppName, 1)
0
 
wiswalldCommented:
Or create a macro using Run App and type something like this below in the command line:

msword :c:\folder1\document.doc"

(depends on what type of file you want to open)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now