HI all, I have not had this problem before but it must be something dumb I am doing. I have listbox 1 where I have columns created through code and on header click event. When I enter on header click event I do a customer sort on column 2. The code looks like this case of : (Form event=On Header Click) C_TEXT($nameofObj_txt) C_LONGINT($dumTbl_L;$dumFld_L) RESOLVE POINTER(Self;$nameofObj_txt;$dumTbl_L;$dumFld_L) if(: ($nameofObj_txt="LB_Header2_l") If (Self->=1) ORDER BY FORMULA([TIN_Inspections];NTI_SortByFormula (Self->);>) Else ORDER BY FORMULA([TIN_Inspections];NTI_SortByFormula (Self->);<) End if
This works every time the value of LB_Header2_l variable changes as it should I have another listbox form where columns not created by code where C_TEXT($nameofObj_txt) C_LONGINT($dumTbl_L;$dumFld_L) RESOLVE POINTER(Self;$nameofObj_txt;$dumTbl_L;$dumFld_L) Case of : ($nameofObj_txt="LB_Header2_l") If (Self->=1) ORDER BY FORMULA([TIN_Inspections];NTI_SortByFormula (Self->);>) COPY NAMED SELECTION([TIN_Inspections];"NTI_TunnelInspSet") Else ORDER BY FORMULA([TIN_Inspections];NTI_SortByFormula (Self->);<) COPY NAMED SELECTION([TIN_Inspections];"NTI_TunnelInspSet") End if $0:=-1 The value of LB_Header2_l never changes so sorting does not work Additionally no other sort works either. Any ideas? Thanks and regards Chuck -- ----------------------------------------------------------------------------------------- Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064 Informed Solutions, Inc. Brookline, MA 02446 USA Registered 4D Developer Providers of 4D, Sybase & SQL Server connectivity https://www.informed-solutions.com ----------------------------------------------------------------------------------------- This message and any attached documents contain information which may be confidential, subject to privilege or exempt from disclosure under applicable law. These materials are intended only for the use of the intended recipient. If you are not the intended recipient of this transmission, you are hereby notified that any distribution, disclosure, printing, copying, storage, modification or the taking of any action in reliance upon this transmission is strictly prohibited. Delivery of this message to any person other than the intended recipient shall not compromise or waive such confidentiality, privilege or exemption from disclosure as to this communication. ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************