Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Turn New/Delete button off for Child Table
Message
De
10/10/2002 04:06:53
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
CodeMine
Divers
Thread ID:
00709581
Message ID:
00709718
Vues:
14
Hi Mel:

>I am pretty sure I would use the IsNewAllowedRule() event for this, but can't figure out the code.

Yes, you could use this method. Also, back to our old friend IsEnabled() (which calls IsNewAllowedRule in its default code for the "New" method), you could say something like :-
Function Form.IsEnabled
... 

Case m.cMethod == 'New'   && Dealing with the New method.
If m.cWorkarea == 'Childtable'
   If Thisform.IsNew('ParentTable')
      *-- We have an un-committed new parent record so disallow new for "Childtable".
      Return .F.
   Endif
Endif
Return .T.
Obviously, this is the sort of code you could put in the IsNewAllowedRule method.

HTH
-=Gary
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform