modified a sql query into FormN1.mrt