D
Dave Bolt
I have a legacy application written using Access 2.0 which is to be updated
to Access 2003 at least in the near future.
I experimented converting to Access 2000 and found this problem.
Public Function Test()
Dim recset As Recordset
Dim db As Database
Dim r As Integer
Set db = DBEngine(0)(0)
Set recset = db.OpenRecordset("testtable")
r = recset.ROW ' This line fails
End Function
Even though ROW, or any other valid field name exists in the table, when
Access tries to compile the VBA function it cannot find a data member in the
RecordSet. Works in Access 97 by the way.
The version below seems to fix the problem, but is it the correct
conversion?
Public Function Test()
Dim recset As Recordset
Dim db As Database
Dim r As Integer
Set db = DBEngine(0)(0)
Set recset = db.OpenRecordset("testtable")
r = recset.Fields("ROW") ' Both these lines work
r = recset("ROW")
End Function
Thanks
Dave
to Access 2003 at least in the near future.
I experimented converting to Access 2000 and found this problem.
Public Function Test()
Dim recset As Recordset
Dim db As Database
Dim r As Integer
Set db = DBEngine(0)(0)
Set recset = db.OpenRecordset("testtable")
r = recset.ROW ' This line fails
End Function
Even though ROW, or any other valid field name exists in the table, when
Access tries to compile the VBA function it cannot find a data member in the
RecordSet. Works in Access 97 by the way.
The version below seems to fix the problem, but is it the correct
conversion?
Public Function Test()
Dim recset As Recordset
Dim db As Database
Dim r As Integer
Set db = DBEngine(0)(0)
Set recset = db.OpenRecordset("testtable")
r = recset.Fields("ROW") ' Both these lines work
r = recset("ROW")
End Function
Thanks
Dave