Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Removing items in a listbox with a SQL source
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Removing items in a listbox with a SQL source
Divers
Thread ID:
00832474
Message ID:
00832474
Vues:
54
Hi all,

I'm building a work order form that has a listbox on a pageframe that is populated with a SQL statement so that the items related to that order are the items in the list box. The user needs to be able to remove items from the order. I'm having problems getting this to work. This code is in the click event of cmdRemoveItem.
LOCAL cSelectedItem
*** remove one item from this order
cSelectedItem = thisform.pgfPuDlvDetails.pagstop1.lstOrderItems.Selected
IF MESSAGEBOX("Are you sure you want to remove this item?", 292,;
	    "Please confirm removing this item") = 6
    IF cSelectedItem 
         thisform.pgfPuDlvDetails.pagstop1.lstOrderItems.RemoveItem
    ENDIF
ENDIF
thisform.Refresh
DODEFAULT()
I've tried variations on this and can't seem to get it to work. After it does work I need to update the underlying table and run the query again so the form is refreshed with the revised data. Where am I missing the point?
Using VFP8 with Codemine7.1 on W2Ksp4
TIA
Opportunity is missed by most people beacuse it is dressed in overalls, and looks like work --- Thomas Edison
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform