johnherrerajuan
Registered User.
- Local time
- Yesterday, 22:06
- Joined
- Feb 25, 2013
- Messages
- 44
Hello I have a database with data already entered. I have a Table that has a Field Name BoxNo which is also is my ID. The boxNo goes from 1,2,3,4...and stops at 50 has a gap and then starts again at 100,101..etc I want to be able to have an increment of one with the boxNo. I made this code with VBA
This is the first time I am using VBA i am not sure were to go from here. I need to know how to run this code. I am not sure if the code is even correct someone please help me.
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.NewRecord Then [BoxNo] = DLast("BoxNo ", "ARCHIVE RECORDS LIST") + 1
End Sub
This is the first time I am using VBA i am not sure were to go from here. I need to know how to run this code. I am not sure if the code is even correct someone please help me.