Compare 17 number fields in a record (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) return the name of the field with the greatest value, highest number.
Appreciate you assistance. Gerald Clare
I suggest you change your structure so that instead of 17 identical fields you will have 17 (or any number) records in a related table. A lot of tasks will become a lot easier, including this one.
BTW, what would you want to be returned in case of a tie?
Message was edited by: Michael Horak
Michael's answer was also my first answer, but if this is your only economical option, I suggest that you use my favorite technique.
MaxNum = Max(MyField_a;MyField_b;MyField_c;MyField_d)
MyField_a = MaxNum;GetFieldName ( MyField_a );
MyField_b = MaxNum;GetFieldName ( MyField_b);
MyField_c = MaxNum;GetFieldName ( MyField_c );
MyField_d = MaxNum;GetFieldName ( MyField_d );
Retrieving data ...