When adding new data to the DB, does the autonumber field automatically increase, you don't have to add to it?

I have changed this as shown:
Quote Originally Posted by si
If you do that, the ID's for the nodes would change from "P" & CStr(lngNodeParent) and "C" & CStr(lngNodeChild) to "N" & rs.Fields("AutoNumber").Value
so would this line
vb Code:
  1. .Nodes.Add "P" & CStr(lngNodeParent), tvwChild, "C" & CStr(lngNodeChild), strNodeChild, "Folder Closed"
now become
vb Code:
  1. .Nodes.Add "N" & rs.Fields("AutoNumber").Value, tvwChild, "N" & rs.Fields("AutoNumber").Value, strNodeChild, "Folder Closed"
or
vb Code:
  1. .Nodes.Add "N" & rs.Fields("AutoNumber").Value, tvwChild,  strNodeChild, "Folder Closed"

Because on this line I am now getting the error:
Item cannot be found in the collection corresponding to the name or ordinal

on this line- this part - "N" & rs.Fields("AutoNumber").Value
vb Code:
  1. With tvwCode
  2.     .Nodes.Add , , "Source", "Source Code", "Folder Closed"
  3.     Do While Not rs.EOF
  4.         'check if node is same or different
  5.         If strNodeParent <> rs.Fields("NodeName").Value Then
  6.             'if different, it's a new parent node
  7.             strNodeParent = rs.Fields("NodeName").Value
  8.             'add 1 to the key
  9.             lngNodeParent = lngNodeParent + 1
  10.             'update key number if previous Parent node had children
  11.             If lngNodeParent <= lngNodeChild Then lngNodeParent = lngNodeChild + 1
  12.             'add the new node, with the new key and it's name
  13.             .Nodes.Add "Source", tvwChild, [U]"N" & rs.Fields("AutoNumber").Value[/U], strNodeParent, "Folder Closed"

Do I still need to use these now I am using the AutoNumber field:
vb Code:
  1. 'add 1 to the key
  2.  lngNodeParent = lngNodeParent + 1