SET EXCLUSIVE OFF SET DELETED ON USE ("U:\Data\Modacad.dbf") lcdesign = [modacad.key3 LIKE "%] + ALLTRIM(thisform.pageframe1.page1.text1.value) + [%"] lcstroke = [modacad.moc042 LIKE "%] + ALLTRIM(thisform.pageframe1.page1.text2.value) + [%"] WITH thisform.pageframe1.page1.list1 .RowSourcetype = 3 .Rowsource = 'SELECT mainkey FROM modacad where &lcdesign and &lcstroke'+; ' into cursor result' ENDWITHThe user then selects the design number of their choice in the listbox and then clicks a button which will then find those records that match the design number. Pretty Straight forward!! The results are displayed in a grid
SET TALK ON SET EXCLUSIVE OFF SET DELETED off USE ("U:\Data\Pdmlog.dbf") SET TALK ON LOCAL lclevel, lctype lclevel = ' and ' + 'pdmlog.database = thisform.pageframe1.page1.combo1.displayvalue' lctype = ' and ' + 'pdmlog.type = thisform.pageframe1.page1.combo2.displayvalue ' create cursor temp (mainkey c(fsize('mainkey','result'))) with thisform.pageframe1.page1.List1 for ix=1 to .Listcount if .Selected[ix] insert into temp values (.List(ix) ) endif ENDFOR ENDWITH WITH thisform.pageframe1.page1.grid1 .RecordSourceType = 4 .RecordSource = 'Select user, database, type, date, time'+; ' from ("U:\Logs\310703\pdmlog.dbf") where temp.mainkey=pdmlog.mainkey into cursor crsmatch' ENDWITH SET TALK offThe only problem is it is PAINFULLY slow!! Really Slow!! There are over 3 million records in this table. Can anybody give me any ideas as to how I can speed this up!!