Someone please explain what this code do?
Sub NewRec()
Dim LastNum As Long
Dim NewLastNum As Long
DoCmd.GoToRecord , , acLast
LastNum = CLng(Me![RECORD #])
NewLastNum = LastNum + 1
DoCmd.GoToRecord , , acNewRec
Me![RECORD #] = NewLastNum
End Sub
I use this for 3 forms and I get error in 2 place and one is ok but seems like everything is same to me.
Thanks for help thank you.
Sub NewRec()
Dim LastNum As Long
Dim NewLastNum As Long
DoCmd.GoToRecord , , acLast
LastNum = CLng(Me![RECORD #])
NewLastNum = LastNum + 1
DoCmd.GoToRecord , , acNewRec
Me![RECORD #] = NewLastNum
End Sub
I use this for 3 forms and I get error in 2 place and one is ok but seems like everything is same to me.
Thanks for help thank you.