Correct Syntax

Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True, password:="OPPS"

Any help would be greatly appreciated.

Who is Participating?
Wayne Taylor (webtubbs)Commented:
What exactly are you hoping to acheive? Are you wishing to link directly to a password protected page? If so, can you post the link to the site you are trying to access?


ca1358Author Commented:
Thank all of you for this, I had 3 different problems with 3 different connections strings, and all you contributed to me finding the solution.  This particular one I ended using.

Sub OpenAccess()

    Dim LPath As String
    Dim LCategoryID As Long
    Const DBPWD = "OOPS"

    'Path to Access database
    LPath = "\\Dtcnas-ilsp002\mandatory\Analysts - Working Files\Carol\Demo\volume.mdb"

    'Open Access and make visible
    Set oApp = CreateObject("Access.Application")
    oApp.Visible = True

    'Open Access database as defined by LPath variable and , false, dbpwd for password
    oApp.OpenCurrentDatabase LPath, False, DBPWD

    oApp.Application.DoCmd.RunMacro "Macro2CloseSwitchboard"
    oApp.Application.DoCmd.OpenForm "Form"
End Sub
Wayne Taylor (webtubbs)Commented:

Thanks for the points, although I think you may have closed the wrong question. If it is, I can ask Community Support to re-open this question for you.


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.