Hi!
I have a table with invoice codes and invoice dates and I would like to build a report with a button. This button would get the highest value in the invoice codes field and add 1 to a brand new invoice and insert this new number into a new record.
I have managed to get the maximum value using this =DMáx("[CustomerInvNumber]";"tblInvoiceNumber"). In this case it would be I-ABC0024. After that I want to add 1 and insert the new code into the field (CustomerInvNumber) of a new record.
As you all probably have noticed I am an Access newbie, so I am not sure how to insert values into a new field/record.
Also, if at all possible, I would like to get some hints on good practices for invoice number generation. What would be a better option, since I-ABC will always be the same for the same customer, maybe it best thing would be to just get this first part of the code, split the previous code in two so I could add 1 and then join it again with I-ABC.
I would also like to keep the zeroes before the number, that is, I want I-ABC00XX.
The DB is this: GENERATE ALFANUMERIC INVOICE CODE.accdb
Thanks in advance!