View Single Post
  #5 (permalink)  
Old December 12th, 2005, 06:00 PM
kindler kindler is offline
Friend of Wrox
 
Join Date: Dec 2005
Location: , , .
Posts: 142
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What you're attempting should probably be done using VB and DAO RecordSets to parse the sorted (descending) age table, and create a new table based on those results. You shouldn't need to add a new column to the original table, just some code like:

Set rst 'blah blah blah
If Not rst.BOF And Not rst.EOF
rst.MoveFirst
colName = rst.Name
colAge = rst.Age
rank = 1
rst.MoveNext
Do Until rst.EOF
If colAge = rst.Age Then
'Add colName, Rank to new table
Else
'Add colName, Rank to new table
Rank = Rank + 1
End If
'Add colName, Rank (not sure about this, figure out if necessary to avoid off-by-one error

Reply With Quote