William Hindman
wdhindman at dejpolsystems.com
Sun Jul 16 14:57:52 CDT 2006
...sorry for previous posting with the wrong subject :( Group: ...the following function using an access wizard library call works in a full A2K3 install but fails in a runtime install" Private Function ExportRoutine() Dim db As Database Dim qdf As QueryDef Dim lorst As Recordset Dim strName As String Dim strFile As String Const strSpecName = "~~TempSpec~~" On Error GoTo ExportRoutine_err With Me.lstResult strFile = DialogFile(OFN_SAVE, "Save file", "", .Column(3) & " (" & .Column(2) & ")|" & .Column(2), CurDir, .Column(2)) End With If Len(strFile) > 0 Then 'first get a unique name for the querydef object strName = Application.Run("acwzmain.wlib_stUniquedocname", "Query1", acQuery) Set db = CurrentDb Set qdf = db.CreateQueryDef(strName, Me.txtSQL) qdf.Close With lstResult Select Case .Column(0) Case 0 'Transferspreadsheet DoCmd.TransferSpreadsheet acExport, .Column(1), strName, strFile, True Case 1 'Transfertext DoCmd.TransferText .Column(1), , strName, strFile, True End Select End With End If ExportRoutine_end: On Error Resume Next DoCmd.DeleteObject acQuery, strName qdf.Close Set qdf = Nothing db.QueryDefs.Refresh Set db = Nothing Exit Function ExportRoutine_err: Resume ExportRoutine_end End Function ...I'm certain that its because the function uses the acwzmain.mde library but I'm not sure I understand why ...if I copythe acwizmain.mde to the Office11 directory on the runtime installs, the function still fails ...is there any way to force a runtime to use the library ...or do I have to back up and approach this in an entirely different way? ...suggestions welcome