AOGFADUGBA
Board Regular
- Joined
- Sep 30, 2015
- Messages
- 74
HI ALL. I HAVE A TABLE WITH AN INDEX FIELD CALLED DEPTNO, WITH ANOTHER NUMERIC KEY CALLED PVNO.
THE PVNO INCREASES BY ONE BY AN AFTER-UPDATE EVENT OF A PDATE FIELD:
Private Sub PDate_AfterUpdate()
If Me.NewRecord = True Then
Me.PVNo = Nz(DMax("PVNo", "CedisPayment"), 0) + 1
End If
End Sub
WHAT I WANT NOW IS FOR THE PVNO TO RESTART AT THE BEGINNING OF EVERY MONTH. AND THE DEPT NO TO RESTART AT THE BEGINNING OF EACH YEAR. IS IT POSSIBLE WITH ACCESS?
THANKS
THE PVNO INCREASES BY ONE BY AN AFTER-UPDATE EVENT OF A PDATE FIELD:
Private Sub PDate_AfterUpdate()
If Me.NewRecord = True Then
Me.PVNo = Nz(DMax("PVNo", "CedisPayment"), 0) + 1
End If
End Sub
WHAT I WANT NOW IS FOR THE PVNO TO RESTART AT THE BEGINNING OF EVERY MONTH. AND THE DEPT NO TO RESTART AT THE BEGINNING OF EACH YEAR. IS IT POSSIBLE WITH ACCESS?
THANKS