Hi All
I have a form called frmPartsRequistion, this form is used for enter data to the tblPartsRequsition. On this form I want to add a subform to let user see the history. Since there may be many records in the subform, I want to number them to make the subform look better. I search on the internet and got the code as below:
Private Sub Form_Current()
On Error GoTo Err_Form_Current
Dim rst As Recordset
Set rst = Me.RecordsetClone
rst.Bookmark = Me.Bookmark
Me.txtPosition = rst.AbsolutePosition + 1
Exit_Form_Current:
Set rst = Nothing
Exit Sub
Err_Form_Current:
If Err = 3021 Then
Me.txtPosition = rst.RecordCount + 1
Else
MsgBox Error$, 16, "Error in Form_Current()"
End If
Resume Exit_Form_Current
End Sub
The form shows like the picture attached, and it seems the code only run for one circle?
Could someone give some suggestion?
Thanks in advance