How do I amend my Access 97 looping code in MS Access 2000?

G

graysi

The following qry used to work in MS Access 1997. I've converted the DB to MS
Access 2000 and it falls over. Can anyone point out where I'm going wrong?

Dim dbsSrc As Database
Dim rstSrc As Recordset

Set dbsSrc = CurrentDb()

Set rstSrc = dbsSrc.OpenRecordset("DS_MS_Output", dbOpenTable)

With rstSrc
Do While Not .EOF
.Edit
.Fields(13).Value = Format(.Fields(12) - .Fields(7), "#,##0;[Red](#,##0)")
.Update
.MoveNext
Loop
..Close
End With
 
M

Mark

You should check your references to make sure the DAO 3.6 Object Library is
checkmarked. I don't think Access2000 selects this library as part of the
default libraries.
 
Top