Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One to manny form
Message
De
12/04/1997 02:08:37
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordanie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00028031
Message ID:
00028050
Vues:
32
>Question,
>
>I created a one to many form with the wizzard. I want to be able to add a record to the 'one' table and then add multiple records to the 'many' table.
>
>when I press the add key on the screen It asks me if I want to add to parent and child and then asks me the key field value.
>
>It there a better way that is a little more seemless. The key field is a caculated field based on what the user inputs in to some of the fields in the parent table.
>

Forget the wizard's toolbar, and create your own class. If you are familiar with class at least you can make buttons.

Create 4 buttons for record navigation -> top, bottom, prev, next

the code should be for top

if !eof()
skip
endif
and so on, same way create add, edit, find, brow, delete
in Add, straight away move the focus to parent field, after the user has entered search through locate or seek it is already there go into edit mode and if it not add in file. use a statement like
select max(keyfield)+1 from yourtable into array yourarray
replace keyfield with yourarray

when the control comes to grid, you an assign any key for adding records in it, In the when event of grid :-

on key label ctrl+n do addrec from yourfile

Try this,
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform