I am trying to get my listbox to dump new values without deleteing the values already in the system. The user opens a form and a list box is populated with values, the user then can add new values, I wanted to be able to run a test and dump the values not already in the system when the user saves. My code below is giving me a nesting error.
WITH ThisForm.Approval_Name_Info_List
SET DECIMALS TO 0
FOR indx = 1 to .ListCount
SELECT pm_lk_permit_name
M.KEY_ID = (Vpm_id)
M.LINK_TYPE = .ListItem(.IndextoItemID(indx), 2)
M.NA_ID = VAL(.ListItem(.IndexToItemID(indx), 3))
M.KEY_TYPE ='pm'
INSERT INTO pm_lk_permit_name (na_id, key_id, link_type, key_type);
SELECT na_id, key_id, link_type, key_type FROM MEMVAR ;
WHERE MEMVAR.NA_ID <> pm_lk_permit_name.na_id AND MEMVAR.LINK_TYPE <> pm_lk_permit_name.link_type ;
WITH ThisForm.Approval_Name_Info_List
SET DECIMALS TO 0
FOR indx = 1 to .ListCount
SELECT pm_lk_permit_name
M.KEY_ID = (Vpm_id)
M.LINK_TYPE = .ListItem(.IndextoItemID(indx), 2)
M.NA_ID = VAL(.ListItem(.IndexToItemID(indx), 3))
M.KEY_TYPE ='pm'
INSERT INTO pm_lk_permit_name (na_id, key_id, link_type, key_type);
SELECT na_id, key_id, link_type, key_type FROM MEMVAR ;
WHERE MEMVAR.NA_ID <> pm_lk_permit_name.na_id AND MEMVAR.LINK_TYPE <> pm_lk_permit_name.link_type ;