Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using a checkbox to display deleted records
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01446020
Message ID:
01446219
Vues:
129
>Make the corntolsource for the checkbox be the DELETED() function. In the click event add this code;

Thank you both Jim and Naomi. I am still not sure how to make the control source the deleted() function. Tried putting the word "deleted()" in the control source, but it does not accept it.

However I got it to work well with the following code:

First Jim's code in the Click event of the checkbox:
IF DELETED()
   RECALL
ELSE
   DELETE
ENDIF
this.refresh
But this on it's own leaves the checkbox ticked for all records, or unticked for all records.

Therefore added some similar code in the Refresh method of the checkbox as suggested by Naomi.
IF DELETED()
   this.Value = 1
ELSE
   this.Value = 0
ENDIF
This keeps the checkbox ticks in sync with the deleted records.

Thank you both for your help. This has been a great help. (Could not find anything on this subject when searching the UT.)

regards
David Wheeldon
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform