J
Johnkl
Hi all
I have a small problem with Dmax
I want to increment the Invoice Number depending on the invoice Series to the
next number as follows :
Invoice Series A , Invoice Number 1.
Invoice Series No Series , Invoice Number 1
Now when I issue the next invoice eith Invoice Series A the Invoice Number is
To be 2 and so on. For this purpose I use the following code after the Before
Insert Event of A Form
Private Sub Form_BeforeInsert(Cancel As Integer)
Me.InvoiceNo = Nz(DMax("[Invoice]", "[tblInvoices]", "InvoiceSeries = '" & Me.
InvoiceSeries & "'")) + 1
End Sub
The problem I face is that it always returns 1.
Can anyone please help!!!!
Kind regards
John
I have a small problem with Dmax
I want to increment the Invoice Number depending on the invoice Series to the
next number as follows :
Invoice Series A , Invoice Number 1.
Invoice Series No Series , Invoice Number 1
Now when I issue the next invoice eith Invoice Series A the Invoice Number is
To be 2 and so on. For this purpose I use the following code after the Before
Insert Event of A Form
Private Sub Form_BeforeInsert(Cancel As Integer)
Me.InvoiceNo = Nz(DMax("[Invoice]", "[tblInvoices]", "InvoiceSeries = '" & Me.
InvoiceSeries & "'")) + 1
End Sub
The problem I face is that it always returns 1.
Can anyone please help!!!!
Kind regards
John