PUBLIC lc_items PUBLIC lc_list lc_items = 'test.tag + "|" + test.item' lc_list = EVALUATE(lc_items)I add a listbox to the form (lstList).
Local ln_x local ln_i If !USed('test') USE test IN 0 ENDIF for ln_i = ThisForm.lstList.LISTCOUNT+1 to 1000 Insert into test (tag, item) values (" ", "Item Number" + STR(ln_i)) endfor For ln_x = 1 to 10000 Insert into test (tag, item) values ("X","Junk Data" + STR(ln_x)) Endfor set filter to test.item = "Item Number" ThisForm.lstList.controlsource = lc_list ThisForm.lstList.rowsourcetype = 6 ThisForm.lstList.RowSource = lc_items WAIT WINDOW "Listcount after adding items to the table: " + STR(ThisForm.lstList.LISTCOUNT)I then added another command button (cmdAdd) that will add a record to the table.
Insert into test (tag, item) values (" ", "Item Number" + STR(ThisForm.lstList.LISTCOUNT+1)) Thisform.lstList.REQUERY Thisform.lstList.SETFOCUS This.SETFOCUS Wait WINDOW "Listcount after an item was inserted into the table: " + str(ThisForm.lstList.LISTCOUNT)I then added the final command button (cmdDelete) that will delete the selected record from the table.
local ln_Deleted ln_Deleted = SET("DELETED") SET DELETED ON DELETE PACK ThisForm.lstList.REQUERY ThisForm.lstList.SETFOCUS THIS.SETFOCUS WAIT WINDOW "ListCount after Deleting: " + STR(ThisForm.lstList.LISTCOUNT) SET DELETED &ln_DeletedNow when you execute this form it will show you the listcount when the items are in the table. The initial listcount will be 1000 which is the filtered records from the table. Now whenever you add an item to the table (after it exceeds 1000) notice the listcount property.