Originariamente inviato da ilfurla
Secondo me si potrebbe fare così:

codice:
        Dim Comando As OleDb.OleDbCommand
        Dim Lettore As OleDb.OleDbDataReader
        Dim rsQry As String

        rsQry = "SELECT id FROM nometabella ORDER BY id desc"
        Comando = New OleDb.OleDbCommand(rsQry, cnConne) 'cnConne è la connessione
        Lettore = Comando.ExecuteReader
        Lettore.Read()
        TextBox1.Text = Lettore.GetInt32(0)
        Lettore.Close() : Comando = Nothing
non funziona