Hi i am having a field empno as nvarchar that starts like "IF002"
I want to auto increment this while i insert each time a record by vbcode
Printable View
Hi i am having a field empno as nvarchar that starts like "IF002"
I want to auto increment this while i insert each time a record by vbcode
if the field follows the same structure.. meaning
IF001
IF002
IF003
etc..
using MAX will work to get it
SELECT MAX(empno) etc....
then just cut and add
tmp = rs.fields(0)
tmp = left(tmp,2) & (Format(Cint(right(tmp,3))+1,"00#")
The order will be
IF001
IF002........IFXXXX
Will it work for Nvarchar in MSSqlserver
it works in access with text which is basically the same thing...
Thanks Static , I check and come back