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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
Back
Top