I have two tables a and b
a's primary key [rid] (a string)
b has a forgin key[rid] from a
I don't know how to group b's [rid](about 12 records each)of 1000+ records, use a
ranking function for b.[pts] to get b.[ptrk] and update b.[ptrk].
Set rs = CurrentDb.OpenRecordset("S
elect oldrank.[" & strField & "] As FieldVal FROM oldrank" & _
" where oldrank.rid= oldrank.rid Group By oldrank.[rid],OLDRANK.[" & strField & "] Having len([" & strField & "]) >0" & _
" Order By [" & strField & "] Desc")
this works without the where statment(but doesn't group [rid]
I don't know if I group in rs of the query that calls the function.
helped by eghtebas in: