lcSQL = "select * " + ; "from TRPSurvey" + "..exported " + ; "where cPermID = '" + alltrim(lcPermID) + "'"Option 2:
lcSQL = "select * " + ; "from TRPSurvey" + "..exported " + ; "where cPermID = ?lcPermID"Provided that lcPermID is already trimmed with spaces.