Wrathchild
Technical User
Hi, I have a table with claim numbers and notes that ee's have entered for the claims with the date of note entry. I'm trying to assign the first note for each claim 1 and the second for each 2 and so on... this will allow me to use these dates to figure out time in between and other stuff I need to do. Here's what I had but it's bombing out on the For Each line with the message: "Operation not supported for this type of object" Also, I'm not sure where to set i back to 0 for the next claim.
Function NurseNoteOrder()
Dim dbs As Database, rst As Recordset, claimnum As Variant, i As Integer, nextclaimnum As Variant
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("tbl_NCM Notes"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
With rst
rst.MoveFirst
Set claimnum = !clm_num
For Each claimnum In rst
i = 0
rst.Edit
!First_ID = i + 1
rst.Update
Next
End With
End Function
Function NurseNoteOrder()
Dim dbs As Database, rst As Recordset, claimnum As Variant, i As Integer, nextclaimnum As Variant
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("tbl_NCM Notes"
With rst
rst.MoveFirst
Set claimnum = !clm_num
For Each claimnum In rst
i = 0
rst.Edit
!First_ID = i + 1
rst.Update
Next
End With
End Function