using links in MSaccess command button

Posted on 2007-10-02
Last Modified: 2012-06-27
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.

Question by:jskfan
    LVL 119

    Accepted Solution

    private sub cmdButton_click()

    dim sApp as string

    followhyperlink sapp

    end sub

    or you can use the shell


    stAppName = "Excel.exe " & Chr(34) & strLoc & xlFile & ".xls"
        Call Shell(stAppName, 1)
    LVL 13

    Assisted Solution

    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)

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Suggested Solutions

    This isn't a frequent question on EE. I must have seen it three or four times (among several thousand questions). However, I use this trick quite often, most frequently as a delayed Current event. A form does not expose it's calculation dependenc…
    In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
    Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now