Heres the code I got so far but it still does the same thing. If you insert one and only one record into the list box it works great, but if you insert more then one record it will dump more then one record into the secord process table. I * out process 2 and it runs great, my values from the list box are dumped. Then is I undo the * it dumps the desired values, and when it comes time to dump the values where the one table doesnt match the second table it dumps all the ones that dont match and a few that do match.
PROCESS 1
WITH ThisForm.Agenda_List
FOR indx = 1 to .ListCount
SELECT agenda_order_info
M.MEETING_DATE = meetingdate
M.PM_ID = VAL(.ListItem(.IndextoItemID(indx), 1))
M.AGENDA_ORDER = indx
INSERT INTO agenda_order_info FROM MEMVAR
NEXT
ENDWITH
PROCESS 2
SELECT pm_id, meeting_date FROM agenda_order_view;
WHERE agenda_order_view.meeting_date = meetingdate ;
AND agenda_order_info.pm_id <> agenda_order_view.pm_id ;
INTO ARRAY laArray
INSERT INTO agenda_order_info FROM ARRAY laArray
PROCESS 1
WITH ThisForm.Agenda_List
FOR indx = 1 to .ListCount
SELECT agenda_order_info
M.MEETING_DATE = meetingdate
M.PM_ID = VAL(.ListItem(.IndextoItemID(indx), 1))
M.AGENDA_ORDER = indx
INSERT INTO agenda_order_info FROM MEMVAR
NEXT
ENDWITH
PROCESS 2
SELECT pm_id, meeting_date FROM agenda_order_view;
WHERE agenda_order_view.meeting_date = meetingdate ;
AND agenda_order_info.pm_id <> agenda_order_view.pm_id ;
INTO ARRAY laArray
INSERT INTO agenda_order_info FROM ARRAY laArray