This is the code I use to access Recordsets and I haven't had any problems using either Access 97 or Access 2000:
Dim Dbs as Database, Rst as Recordset
Dim Ctr,Ttl as Long
Ctr = 0
Set Dbs = CurrentDb
Set Rst = Dbs.OpenRecordset("Name of Table/Query",dbOpenDynaset)
DoCmd.OpenForm "StatusBox"
*** Note: if you're just looking at the information and not changing/adding - I use "dbOpenSnapshot" instead of dbOpenDynaset
Rst.MoveLast
Rst.MoveFirst ' Populates Recordset
Ttl = Rst.RecordCount ' Can only count after populating
Do While Not Rst.EOF ' EOF = End of File
Ctr = Ctr + 1
Forms!StatusBox!Status.Caption = "Processing Record " & Ctr & " of " & Ttl
DoEvents ' DoEvents makes sure the form updates and shows the user the count
Select Case UsersChoice
Case 1 ' Option to Delete Record
Rst.Delete
Case 2 ' Option to Modify Record
Rst.Edit
Rst!Name = "UserGivenName"
Rst!Status = "UserGivenStatus"
Rst.Update
Case 3 ' Option to Add Record
Rst.AddNew
Rst!Name = "UserGivenName"
Rst!Status = "UserGivenStatus"
Rst.Update
End Select
Rst.MoveNext
Loop
Rst.Close
Hope this helps,
Roy (aka BanditLV)
Las Vegas
For further information, you can contact me at RLMBandit@aol.com