P
Pete
I am working with Access 2000 Databases in a Windows 2000
environment. This week, VBA code that previously worked
began acting strangely.
The only network upgrades that we have noticed are the
Internet Explorer 6.0.2800 patch and our version of VB has
upgraded from VB5 to VB6.
Specifically, Recordsets created in VBA code that have
multiple records only return a recordcount value of 1.
When the fields are referenced, the values are from
records in the middle, not the beginning or end of the
recordset. The recordset returns an accurate recordcount
only if MoveLast or an EOF loop is used. I am uncertain of
the implications of this, but recoding/checking our
existing databases would prove to be a challenge.
Here are the VBA References we are using:
Visual Basic For Applications
Microsoft Access 9.0 Object Library
Microsoft DAO 3.6 Object Library
OLE Automation
Here is some sample code that once displayed a msgbox "3"
and now displays a msgbox "1"
Private Sub Command0_Click()
Dim rst As Recordset
Set rst = CurrentDb.OpenRecordset("SELECT * FROM Tub",
dbOpenDynaset)
MsgBox rst.RecordCount
End Sub
Has anyone else encountered this problem ?
Thanks in Advance.
environment. This week, VBA code that previously worked
began acting strangely.
The only network upgrades that we have noticed are the
Internet Explorer 6.0.2800 patch and our version of VB has
upgraded from VB5 to VB6.
Specifically, Recordsets created in VBA code that have
multiple records only return a recordcount value of 1.
When the fields are referenced, the values are from
records in the middle, not the beginning or end of the
recordset. The recordset returns an accurate recordcount
only if MoveLast or an EOF loop is used. I am uncertain of
the implications of this, but recoding/checking our
existing databases would prove to be a challenge.
Here are the VBA References we are using:
Visual Basic For Applications
Microsoft Access 9.0 Object Library
Microsoft DAO 3.6 Object Library
OLE Automation
Here is some sample code that once displayed a msgbox "3"
and now displays a msgbox "1"
Private Sub Command0_Click()
Dim rst As Recordset
Set rst = CurrentDb.OpenRecordset("SELECT * FROM Tub",
dbOpenDynaset)
MsgBox rst.RecordCount
End Sub
Has anyone else encountered this problem ?
Thanks in Advance.