Thanks for your response, Jon. Unfortunately in my setup, both Access and Statistics are 32-bit. As far as whether we are using the SPSS ODBC driver in Access,
I am not sure. I didn’t design this database and I am not overly familiar with db design; how can I check whether it is using the SPSS ODBC driver? Thanks, Aaron From: Jon K Peck [mailto:[hidden email]]
There were no changes in sav file formats in V22. I suppose that you are using the SPSS ODBC driver from Access. If your Office and Statistics version are not the same bit
size, though, this won't work. I happen to be on Office 2007, which is 32-bit only and have a 64-bit Statistics 22, and they will not talk to each other.
|
Jon, I don’t see the SPSS ODBC driver in the list. In addition, Access is using VBA to import the dataset but I don’t see any references to any .tlb files. Below is the chunk of code where I think the problem
may lie, is the problem in the code calling “spss.application16?” Aaron Sub ExtractSPSS() Dim fileName As String fileName = GetOpenFile("Z:\Project\Data Collection and Analysis\Data", "Find the SPSS dataset to add/update", "sav")
If fileName = "" Then Exit Sub End If
DoCmd.Hourglass (True) Dim Delim As String Delim = Chr(9) Dim objSPSSApp As Object Dim objDataDoc As ISpssDataDoc Dim objDocuments As ISpssDocuments Dim blCloseSPSS As Boolean
On Error Resume Next Set objSPSSApp = GetObject(, "SPSS.Application16")
If objSPSSApp Is Nothing Then blCloseSPSS = True Set objSPSSApp = CreateObject("SPSS.Application16") If objSPSSApp Is Nothing Then MsgBox "SPSS is not installed on your computer" DoCmd.Hourglass (False) Exit Sub End If End If
On Error GoTo 0
objSPSSApp.OpenDataDoc (fileName) Set objDocuments = objSPSSApp.Documents Set objDataDoc = objDocuments.GetDataDoc(0) From: Jon K Peck [mailto:[hidden email]]
The user interface varies from one version of Access to another, and the code could be done several different ways, so I can't really tell you where to look. It could be referenced
in a SQL statement or referred to as an external data source. You might start by seeing whether the ODBC driver is actually installed on your system. Use Control Panel > Administrative Tools >ODBC Data Sources (ODBC) to see whether you have this driver.
|
Administrator
|
Aaron, "Access is using VBA to import the dataset but I don’t see any references to any .tlb files." Well that is very likely the crux of the problem: Likely that adding a reference to spsswin.tlb will correct the problem. I don't have M$ Access on this machine so can only suggest you do an F1. On my machine the SPSS tlb files are located in .../Program Files/Common/IBM/SPS/COM The message you reported is NOT helpful because it is in your code and not something that arises from the GetObject call. HTH, David
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Administrator
|
Comment!
On Error Resume Next? Seriously. That is shameful!!!
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Free forum by Nabble | Edit this page |