Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code for appending multiple data from a list box???
Message
From
18/11/1998 10:14:19
 
 
To
18/11/1998 10:06:46
Noman Aftab
Embry-Riddle Aeronautical University
Daytona Beach, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00158714
Message ID:
00158763
Views:
14
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform