Private Sub CreateJobNodes()
  Dim rst As DAO.Recordset ' recordset for category data

  ' open the recordset for categories
  Set rst = CurrentDb.QueryDefs!qryJobNums.OpenRecordset

  ' loop through the rows in the recordset
  rst.MoveFirst
  Do Until rst.EOF
    Me.TreeJobTracker.Nodes.Add Text:=rst!jpJobNum, _
      Key:=CStr(rst!jpJobNum)
    rst.MoveNext
  Loop
  rst.Close
  Set rst = Nothing
End Sub