"SELECT MAX(ID) FROM tabella"

Apri il recordset e in rs(0) hai il valore.

Roby