Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using modal data child form for adding new records
Message
De
20/11/2002 11:28:31
 
Information générale
Forum:
Visual FoxPro
Catégorie:
CodeMine
Divers
Thread ID:
00724730
Message ID:
00724811
Vues:
22
Use either the new() or if you have an older version there is a aRevertData[] array.

I think the accepted way is to place a new button on the form ( or call the button) and then use the afternew2() as follows:

LPARAMETERS cWorkarea

IF m.cWorkarea = 'Esclient'
DO FORM newclient TO lStatus
IF NOT m.lStatus
* User canceled the dialog, so we remove the new record from the update buffer.
THIS.DELETE(m.cWorkarea)
ENDIF
ENDIF

IF m.cWorkarea = 'Enroll'
*THISFORM.cmdatamanager.new('enroll')
THISFORM.cmdatamanager.REPLACE('enroll','clientid',esclient.clientid)
THISFORM.cmdatamanager.REPLACE('enroll','enroll_dte',DATE())
THISFORM.editmode()
THISFORM.openchild('enroll_class.scx')
ENDIF

Notice that I test if the user cancelled.
John
John Fabiani
Woodland, CA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform