create cursor nameList (lastName c(3)) with thisform.pageframe.page3.list3 for i = 1 to .listCount insert into nameList values (left(.list(i),3)) next i endwith select * from c:\phonebook\addresses.dbf ; where lastname in (select * from nameList) ; into table c:\phonebook\temp.dbf>Thanks but it still isnt working like it should. Now it is asking me for what file to put everything into with each record that I want to print into it. When your printing 2000 records that gets annoying :) Does anyone know of a way to print this into a data base file or txt file that works? I have been trying to get this working for a about 2 days and havent had much luck.