MartyConnelly
martyconnelly at shaw.ca
Mon Mar 13 13:35:41 CST 2006
How about doing it this way. Run a vbs script from a desktop shortcut. Or double click vbs file from windows explorer or even shell to it. Assuming that vb scripting allowed. You can also open various versions of Access in code below via Set AcApp = CreateObject("Access.Application.8") 'Access 97 Set AcApp = CreateObject("Access.Application.11") 'Access 2003 You can create a VB script file with this code and start your app using this. (Code is from an MS article) http://support.microsoft.com/?kbid=235422 'File myVersion.vbs Const cDatabaseToOpen = "C:\<FileToOpen>.mdb" On Error Resume Next Dim AcApp 'if multiple Access versions on machine this will open last version opened Set AcApp = CreateObject("Access.Application") If AcApp.Version >= 10 Then AcApp.AutomationSecurity = 1 ' msoAutomationSecurityLow End If AcApp.Visible = True 'open your access application AcApp.OpenCurrentDatabase cDatabaseToOpen If AcApp.CurrentProject.FullName <> "" Then AcApp.UserControl = True Else AcApp.Quit MsgBox "Failed to open '" & cDatabaseToOpen & "'." End If John Colby wrote: >>John, you want to check the version and then load code based on the >> >> >version? > >Yes, the ACCESS version. I have found stuff about checking the registry, >but this really only addresses what is INSTALLED, not what is currently >running. > > >John W. Colby >www.ColbyConsulting.com > > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins >Sent: Sunday, March 12, 2006 7:33 PM >To: 'Access Developers discussion and problem solving' >Subject: Re: [AccessD] Discovering Access version at runtime - was >AccessXPforms bound to ADO recordsets > >John, you want to check the version and then load code based on the version? > > >Susan H. > >of RaiseEvents in the framework. Now we have code which works in AXP but >not A2K and below. So I would like to carve this stuff out and only load it >if the version being run under is AXP or above. A quick Google search does >not come up with anything. > > >-- >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com > > > -- Marty Connelly Victoria, B.C. Canada