Link to home
Start Free TrialLog in
Avatar of ca1358
ca1358

asked on

Correct Syntax

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

Any help would be greatly appreciated.

ASKER CERTIFIED SOLUTION
Avatar of Wayne Taylor (webtubbs)
Wayne Taylor (webtubbs)
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ca1358
ca1358

ASKER

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
ca1358,

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.

Cheers,

Wayne