Borge Hansen
pcs at azizaz.com
Mon Oct 17 09:55:00 CDT 2005
Running Windows XP SP1
Access (OfficeXP SP3) (Coexists with Access97)
Jet4 SP8
Cannot establish any ADO connection ..... Access (or whatever is in control
here) does not recognize the CurrentProject.....
The following codebit from Getz' Access2002 CH3.MDB keeps crashing on the
line starting rst.Open "Select....
*******************
Public Function Load() As Boolean
Dim rst As ADODB.Recordset
On Error GoTo HandleErrors
Set rst = New ADODB.Recordset
'Crashes on the following line
rst.Open "Select * from tblCats WHERE ID = " & Me.ID,
Application.CurrentProject.Connection
With rst
If Not .EOF Then
mstrName = !Name
mdatBirthdate = !Birthdate
mstrSex = !Sex
mstrBreed = !Breed
mstrColor = !Color
mfNeutered = !Neutered
mlngID = !ID
End If
End With
Load = True
ExitHere:
If Not rst Is Nothing Then rst.Close
Set rst = Nothing
Exit Function
HandleErrors:
Load = False
MsgBox "Error Here: " & Err.Number & ": " & Err.Description
Resume ExitHere
End Function
Note: The code as is crashes Access because of the poor error handling,
****************
I have repaired, re-installed, removed and installed from scratch OfficeXP
Professional - no improvement...
Runnig the same code on another machine with Access2003 installed (and no
other Office version) with no problem....
What does it take to run it on the other machine with AccessXP installed???
As I said, I've repaired, re-installed, then removed all of OfficeXP and
installed from scratch....
Funny enough, after that it still says SP3 on the About Screen......
All references when loading CH3.mdb are ticked....
I am at the end of the rope....
HELP!
/borge