>>>How can I add extra new rows in the listbox when is populated from a table (alias)?
>
>>In addition to what Ko answered, if you do not want to change table, you require to read table into listbox manually in the loop through table records using AddListItem and AddItem methods of listbox. Than you will be able to do anything with listbox items. You can try to use these methods with table too (I hope this works), but any requery of listbox will require to add these items again.
> Even when you want to modify the table, you can still use it as the RecordSource, turning buffering to 5. When you're done using it, just drop the changes with TableRevert().
Another option is to have a separate cursor with just the fields we need appended from the table, and the additional records added, i.e.
[this code best fits form.init - tables are already open, listbox exists]
create cursor ForListbox (cCode c(4), cName c(40))
append fields cCode, cName from TheTable
insert into ForListBox (cCode, cName) values ('X001','[add new]')
insert into ForListBox (cCode, cName) values ('X002','[delete all]')
with thisform.[full containership path here].listbox
.rowsourcetype=6
.rowsource='forlistbox.cName,cCode'
.boundcolumn=2
.columnwidths="["+tran(.width)+",0]"
endwith
Any additions to this cursor may or may not be echoed into the original table, depending on the programmer's decision, i.e. he's in charge here.