The following does not seem to be working anyone with a idea as to why? global gbrand put "SELECT yrmodsize FROM stockvalving WHERE stockvalving.brand='" & gbrand & "' ORDER BY yrmodsize DESC" into theSQL put VDataBase_SqlSelect(mDatabase, theSQL) into curID Thanks Robert Mann