Hello Norbert,
You might want to run a SQL statement like "SELECT MAX(CardCode) AS MaxCode FROM OCRD" etc.
In case you only use numbers, you can convert the result directly to a number in VB (VB.NET: CInt(oRecordSet.Fields.Item("MaxCode").Value) and increment it. Otherwise you have to treat the result according to the pattern you want to use...
Regards,
Frank
Add a comment