Dmax function
I use a function called Dmax to increase the number of my invoices with 1.
I want the function to look for the highes invoice number(invoiceid) in the database, and to increase This numnber with 1.I have tried to build the following function without success:
increment = DMax(“[invoiceid]”, “[orders]”, “[invoiceid]”) + 1
In this case I receive impossble figures. For example the number of the last
Invoice is 6700 and I receive 227300.
The function Dmax however works with me in the following way:
increment = DMax(“[invoiceid]”, “orders”, “[invoiceid]< 9000 ") + 1
'I have this function and it works, however I do not want to
be restricted by the number 9000
How can I avoid the restriction of 900 and apply this function more flexible?
To be more exact, how can I make the folowing function work?
increment = DMax("[invoiceid]", "[orders]", "[invoiceid]") + 1