Can some one help me with this code. I have 2 page tabs on a form, and I want an incremental number assigned to each new record on that page.
Been doing some research and this is what I came up with:
Private Sub Form_Current()
If Me!tabSupplier.NewRecord = True Then
Me!tabSupplier!DocumentNo = Nz(DMax("DocumentNo", "Product"), 1000) + 1
End If
End Sub
The page nane is: Supplier Page Index is:0
The control to display the incremental number is
ocumentNo (tblProducts)
Only problem is, it does not work and I am getting no error message.
Been doing some research and this is what I came up with:
Private Sub Form_Current()
If Me!tabSupplier.NewRecord = True Then
Me!tabSupplier!DocumentNo = Nz(DMax("DocumentNo", "Product"), 1000) + 1
End If
End Sub
The page nane is: Supplier Page Index is:0
The control to display the incremental number is

Only problem is, it does not work and I am getting no error message.