HI
am having an MS_Access 2010 Form containing a subform that i assign a continues row number as this
Option Explicit
Public Function fRowNum(Reset As Boolean) As Long
Static I As Integer
If Reset = True Then
I = 0
End If
'Add Row Numbers to Continuous Forms:
I = I + 1
fRowNum = I
End Function
when ever i load the form, the line numbers uses to recall the last values just like auto number but i want it to restart from (1), i succeed by using reset code as Private Sub Form_Load()
DoCmd.RunCommand acCmdReset
but whenever i load the form i use to get runtime error '2046' i want to disable that any help? sorry for my English