It is hard to explain but basically I have numbers set up like this in 5 columns. I need to number c5 based on c1 and c2. In this instance there are only three different sets based on c1/c2. I want to start at 1 and end up at whatvever number of rows there are in this data set. Essentially the next 3 rows in c5 will be 4 and so forth. Basically c1=x, c2=y,c3=z, c4=c(concentration) c5=subsurface log #. I am comfortable transfering code to Access VBA. The number is going to be in the millions for # of rows usually. The actual number in c5 will be in much larger increments than 3 also. Probably around 200 or so. So for 200 rows there will be a #1 in c5 and for the next 200 a #2 etc...
c1 c2 c3 c4 c5
12 14 10 1 1
12 14 11 3 1
12 14 12 4 1
13 15 10 7 2
13 15 11 8 2
13 15 12 3 2
10 21 10 5 3
10 21 11 7 3
10 21 12 9 3
dim rs as recordset, ctr as long, c1 as long, c2 as long
with rs
.open("numberTable")
.movefirst
c1 = 0
c2 = 0
do while not .eof
if c1 <> rs.c1 or c2 <> rs.c2 then
ctr += 1
c1 = rs.c1
c2 = rs.c2
end if
.edit
!c5 = ctr
.update
loop
end with
The only problem I see is the select might not be in the same order as the original table. You might