SELECT PADR(ALLTRIM(Matl_Cde),6," ") + "|" + ALLTRIM(Desc), MATL_CDE ; FROM C:\QUOTE\Table_L ; ORDER BY MATL_CDE ; INTO ARRAY ThisForm.aResinMaterial *** 03/10/2006 Cecil Champenois. Copy the contents of one array to *** the other. ACOPY(ThisForm.aResinMaterial, ThisForm.aResMatl)WHEN of COMBOBOX
WITH ThisForm *SET STEP ON .cPreviousResMatlValue = Quotes.MatlCode ENDWITHLOSTFOCUS EVENT
* We find out the element number of the Resin Material Code the user selected * from this Combo Box. Once we have the element number, we search the array to * obtain the description from the entire array item that the user selected. *SET STEP ON WITH ThisForm IF This.Value <> .cPreviousResMatlValue lnElement=ASCAN(ThisForm.aResMatl,ALLTRIM(This.Value)) IF lnElement <> 0 * Copy the Description into the Quotes table into the Matl_Desc * field, if the Material Description is different than what is * in the Quotes table as compared to the array item. IF ALLTRIM(Quotes.Matl_Desc) <> ALLTRIM(SUBSTR(.aResMatl(lnElement),8)) REPLACE Quotes.Matl_Desc WITH SUBSTR(.aResMatl(lnElement),8) ENDIF ENDIF ENDIF .SaveCancelStatus() This.Refresh() ENDWITH