Access 2007 Crashes with ADODB Recordset (1 Viewer)

Rank Am

Registered User.
Local time
Today, 16:54
Joined
Apr 30, 2005
Messages
68
I have this really irritating problem with access 2007:
the following code causes access 2007 to crash every time and i have no idea why

Code:
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
With rs
    .ActiveConnection = CurrentProject.Connection
    .CursorType = adOpenKeyset
    .LockType = adLockOptimistic
End With
rs.Open "TBL_DOC"

Whenever I try and instance a recordset from anywhere in VBA I get a cryptic error message "Access has stopped working" and access proceeds to shut down - no other info
It also happens if i try to use a variable to hold a select statement

I am running win 7 and Access 2007 all fully updated. I hjave tried ActiveX data objects 2.7, 2.8 and 6.0 in the vb references and the same happens.
File format is 2007

Anyone any idea what causes this and how to solve it

Regards

Jon
 
Last edited:

Rank Am

Registered User.
Local time
Today, 16:54
Joined
Apr 30, 2005
Messages
68
Sorted, it was failed update of office, all worked when I rolled back and reapplied the update.
 

Users who are viewing this thread

Top Bottom