I use this, and if checking at line Break2 I can see that rMax(FieldName) keeps the highest value.
But somehow in running further I got a NilException when try
HighestValue= rMax.Field(“FieldName”).IntegerValue
HighestValue is an integer public property of the page
[code]
Dim rMax as RecordSet
dim rMax as RecordSet =db.SQLSelect(“select max(FieldName) from Table WHERE (Deleted = 0)”)
if db.Error then
break1
end if