>>I'm interested in building a ComboBox picklist that has a '< New >' selection in it (like Quicken's Pulldown picklists).
>>I don't like the idea of using a view as the RowSource, because of the constant Requery()s, so I'm thinking of using the base table and (1) appending a blank record (with '< New >' as the name), (2) deleting it (and re-appending it if a pack is done), (3) always using buffering for the forms that use it, and (4) Recalling it in GotFocus() and Deleting it again in LostFocus().
>>
>>What kind of problems do you think I'll run into?
>>
>>TIA
>Bill,
>
>You can set the rowsourcetype to None and put this code in the requery of the combo;
>
>
>* Combo classes requery
>LOCAL lcAlias, lcOrder, lnNewItem
>lcAlias = ALIAS()
>SELECT <TheAlias for the combo>
>lcOrder = SET("ORDER")
>SET ORDER TO <the tag you want>
>GO TOP
>WITH THIS
> .Clear()
> lnNewItem = .NewItemId + 1
> .AddListItem("<NEW>",lnNewItem)
> SCAN
> lnNewItem = .NewItemId + 1
> .AddListItem(TabelFieldName,lnNewItem)
> ENDSCAN
>ENDWITH
>
>
>The add a call to the Requery in the Init to the combo is initially filled. Anytime you want to refresh the list of options in the combo call its requery method.
I haven't tried this because my help file says that .AddListItem and .AddItem only work when .RowSourceType=0. I don't want to build the list, I want to use .RowSourceType=3 or 6.
Bill Morris