Following SQL Statement should deliver the next free Invoice Number. Be aware that this is not multi-user capable. So when you insert the record you may get a duplicate key error and have to get a new Invoice Number with the same statement until it doesn't
fail anymore. In addition: The first Invoice Number you should add manually as this statement will probably not work on an empty table.
SELECT'JSP' & MAX(MID([InvoiceNo],4)+1) AS NextInvoiceNo
BTW: Access2007 is not the database engine, this is JET (MDBs) or ACE (ACCDBs). The prefered access method is DAO.
"ranohj" schrieb im Newsbeitrag news:firstname.lastname@example.org...
guys, can you help me how to increment a Invoice Number when it is a
Text Format in ms-access...
Im using ms access 2007 and Visual Studio(Visual Basic) 2008