lQuit=.f. on Escape lQuit=.T. && Press Escape to stop SELECT nnnn scan while !lQuit ccode=code INKEY(1,'shk') * thisform.command1.Click() photo_file=allt(code)+".jpg" thisform.image1.Picture= "D:\SCHOOL\STPICS\"+(photo_file) ENDSCAN