max = e.DataTable.SQLCompute("Max(委托书编号)","出具日期 >= '" & fd & "' And 出具日期 < '" & ld & "' And [_Identify] <> " & e.DataRow("_Identify")) '取得该月的最大委托书编号
http://www.foxtable.com/webhelp/scr/2668.htm