davieboy_xr
05-16-2004, 07:38 PM
re: http://www.visualbasicforum.com/showthread.php?t=150667
i also have the same problem .. i have created my app using access object library 11(2003). I need to support earlier versions of access as my distrubution covers access 2000 to 2003. So far i have this
Dim strResult
Dim objAccess As Access.Application
Set objAccess = New Access.Application
Dim appAccess As Object
MsgBox Application.SysCmd(acSysCmdAccessVer)
'where strResult holds the return value
strResult = Application.SysCmd(acSysCmdAccessVer)
If strResult <> "" Then
Select Case strResult
Case "11.0"
Set appAccess = CreateObject("Access.Application.11")
Case "10.0"
Set appAccess = CreateObject("Access.Application.10")
Case "9.0"
Set appAccess = CreateObject("Access.Application.9")
End Select
With objAccess
.DoCmd.SetWarnings False
.OpenCurrentDatabase ("C:\db1.mdb"),false
.Application.Run "Runmaketabs"
.Quit
End With
End If
As i understand it i need to create a new object for each reference from the Access object library. But this already uses the reference from the object library to start with so when i take it accross to access 2000 it crashes as i use a 'make table query' inside my database ... Can anyone help on this one?
i also have the same problem .. i have created my app using access object library 11(2003). I need to support earlier versions of access as my distrubution covers access 2000 to 2003. So far i have this
Dim strResult
Dim objAccess As Access.Application
Set objAccess = New Access.Application
Dim appAccess As Object
MsgBox Application.SysCmd(acSysCmdAccessVer)
'where strResult holds the return value
strResult = Application.SysCmd(acSysCmdAccessVer)
If strResult <> "" Then
Select Case strResult
Case "11.0"
Set appAccess = CreateObject("Access.Application.11")
Case "10.0"
Set appAccess = CreateObject("Access.Application.10")
Case "9.0"
Set appAccess = CreateObject("Access.Application.9")
End Select
With objAccess
.DoCmd.SetWarnings False
.OpenCurrentDatabase ("C:\db1.mdb"),false
.Application.Run "Runmaketabs"
.Quit
End With
End If
As i understand it i need to create a new object for each reference from the Access object library. But this already uses the reference from the object library to start with so when i take it accross to access 2000 it crashes as i use a 'make table query' inside my database ... Can anyone help on this one?