You are on page 1of 1

set rs= new ADODB.

Recordset
rs.open" select * from table2 order by ID_Number desc",cn,3,3
Dim nums As String * 6
Dim numss As Long
with rs
If rs.EOF then
nums="17-"+"000"
Text1.text=nums
else
numss=Right(!ID_Number,3)+1
nums="17-"+Right("000" & numss,3)
end if
text1.text=nums
end with
set rs=nothing

You might also like