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
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
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: