MartyConnelly
martyconnelly at shaw.ca
Sun Feb 6 15:18:19 CST 2005
The Access 97 basic default references are: Visual Basic for Applications Microsoft Access 8.0 Object Library Microsoft DAO 3.5x Object Library You might have switched to Microsoft DAO 3.6 Object Library instead of old default DAO 3.5 both will work, but DAO 3.5 may not be available on some newer machines Notes on references http://members.rogers.com/douglas.j.steele/AccessReferenceErrors.html Try some of these routines and see if you get any meaningful error messages The first forces a reference to be added from code The rest list things like full path name of all references Function ReferenceFromFile(strFileName As String, Optional Warning As Boolean) As Boolean ' To Call routine 'ReferenceFromFile "c:\Windows\System\vbscript.dll\3", True 'ReferenceFromFile "c:\windows\system\vbscript.dll\4",true ' This method is used to get at regular expression entry points from vbscript 'The code works with Access '97 all service packs, on NT4 and all service packs 'You know that adding a ref will cause a decompile? and hence won't work in mde. 'I gather you only use this when setting up a new install. 'BTW if possible supply the modules or library names when describing a AV, GPF, IIE 'i:e: Msaccess.exe, vba332.dll, myaxdll.dll etc 'visit www.trigeminal.com and check out the /decompile switch '- try it as per instructions and then try to add refs. Dim ref As Reference On Error GoTo Error_ReferenceFromFile Set ref = References.AddFromFile(strFileName) ReferenceFromFile = True Exit_ReferenceFromFile: Exit Function Error_ReferenceFromFile: If Warning = True Then MsgBox Err & ": " & Err.Description ReferenceFromFile = False Resume Exit_ReferenceFromFile End Function Function ReferencePropertiesList() As String 'list all references in a MDB and place in a string Dim ref As Reference Dim strList As String strList = "Reference Properties:" & vbCrLf & vbCrLf For Each ref In References ' Check for ActiveX type files 'Check for Broken Properties If ref.IsBroken = False Then strList = strList & " Name: " & ref.Name & vbCrLf strList = strList & " FullPath: " & ref.FullPath & vbCrLf strList = strList & " Version: " & ref.Major & "." & ref.Minor & _ vbCrLf 'skip these two calls if detail not needed ' strList = strList & " Description: " & _ GetFileDescription(ref.FullPath) & vbCrLf ' strList = strList & " Version No: " & _ FileVersionNo(ref.FullPath) & _ vbCrLf & vbCrLf Else strList = strList & " GUIDs of broken references:" & vbCrLf strList = strList & " " & ref.Guid & vbCrLf & vbCrLf End If 'MsgBox GetFileDescription(ref.FullPath) 'MsgBox FileVersionNo(ref.FullPath) Next ref Debug.Print strList ReferencePropertiesList = strList End Function Sub testref() On Error GoTo err_fcbr Dim bln_broken As Boolean Dim LibObject As Access.Reference 'VBA used to disambiguate call on startup to avoid vba reference call ' see kaplan's site For Each LibObject In Application.References If LibObject.IsBroken Or _ (LibObject.FullPath & "" = "") Or _ (LibObject.Name & "" = "") Then bln_broken = True If LibObject.Kind = 0 Then VBA.MsgBox "TypeLib reference failure. Cannot Continue." Else VBA.MsgBox "Library Module not Found" End If Application.Quit 'this may not work anyway - it's an object reference..... End If Next Exit Sub err_fcbr: VBA.MsgBox "CTM Error Information..." & VBA.vbCrLf & VBA.vbCrLf _ & "Function: CheckBrokenRef" & VBA.vbCrLf _ & "Description: " & Err.Description & VBA.vbCrLf _ , VBA.vbInformation, "CTM Startup" Application.Quit Exit Sub End Sub 'from http://support.microsoft.com/default.aspx?scid=KB;EN-US;q194374&ID=KB;EN-US;q194374 Function CheckRefs() Dim db As Database, rs As Recordset Dim x Set db = CurrentDb On Error Resume Next ' Run the query qryTestRefs you created and trap for an error. Set rs = db.OpenRecordset("qryTestRefs", dbOpenDynaset) ' The if statement below checks for error 3075. If it encounters the ' error, it informs the user that it needs to fix the application. ' Error 3075 is the following: ' "Function isn't available in expressions in query expression..." ' Note: This function only checks for the error 3075. If you want it to ' check for other errors, you can modify the If statement. To have ' it check for any error, you can change it to the following: ' If Err.Number <> 0 If Err.Number = 3075 Then MsgBox "This application has detected newer versions " _ & "of required files on your computer. " _ & "It may take several minutes to recompile " _ & "this application." Err.Clear FixUpRefs End If Mark Breen wrote: >Hello All, > >As you may have noticed from previous emails related to ADO etc, I am >have a fine ol' time with an old friend Access 97. > >Having offered the suggestion of moving to ADO and rolling it our >across 300 pc's!, and having taken your good advice (thanks again), >they assigned me the task. > >Anyway, I have done a little research and cannot wait to start calling >sprocs in Oracle 8i and passing parameters in and out using ADO and >Access 97. > >Only one problem, on my PC, (the one that I am using in the clients >office anyway), Access 97 with the latest sp and jet etc, will not let >me set references. It crashes everytime I click Ok after choosing a >dll to reference. It is not just ADO, in fact it happens with almost >all dlls in the list. > >I have tried it with new and existing db, btw. > >Now of course I can do some obvious things like use another PC or >format my pc or a lot of other heavy handed things, but I am consious >of the fact that any difficulties I experience may be experienced by >the other 300 - 400 users of the Access app. > >So, have you guys ever had any difficulties setting references in >Access 97? or related information. > >Thanks as usual in advance for your time > > >Mark Breen >Ireland > > -- Marty Connelly Victoria, B.C. Canada