select from mstr where UPPER(inname) = UPPER(TRIM; (thisform.pageframe1.page1.text1.Value)); and nam1 =thisform.pageframe1.page1.text4.Value and; datein>=thisform.pageframe1.page1.text3.value .and.; datein<=thisform.pageframe1.page1.text5.value; into cursor TempReport; nofilter if _tally = 0 MessageBox("No records selected. Try changing your criteria.") else report form mstr22 preview endif select mstr && go back to the table that belongs to the gridThe semicolon, ";", tells VFP that the command continues on the next line. It can help make your code more readable (since you don't have to scroll horizontally to see the entire command).