Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code for appending multiple data from a list box???
Message
De
18/11/1998 10:14:19
 
 
À
18/11/1998 10:06:46
Noman Aftab
Embry-Riddle Aeronautical University
Daytona Beach, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00158714
Message ID:
00158763
Vues:
16
>Yes I want to add to the many side of the table. I have made the form in such a way that all the selection is done on another form and then its passed back to the form with all the data which will be saved to different tables.
>
>THANKS

Let say, you selected 5 items (names) to listbox and want to add them to Employee record pertained to particular department ('Depart' is selected parent record). Then you may do following (it's simplified, in really strict case you may use Transaction):
Local nDeptid,nLoop
nDeptid=Depart.Id
For nLoop=1 to ThisForm.MyList.Listcount
cName=ThisForm.MyList.List(nLoop)
INSERT Into Employee (DeptId,Name) Values(nDeptid,cName)
Endfor
You may also have to fill other fields, probably you will generate unique Id for each employee record.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform