In the attached code i'm trying to run SQL queries on the fly as a search string is typed in using txtSQL2_KeyPress. It seems that the txtSQL2_KeyPress event doesn't get the latest text that has been typed in - always a cycle behind. Type in 'Area' into the pink text box. Is there a way round this?