SET SAFETY off SET CENTURY on SET DATE BRITISH SET TALK OFF SET STATUS offNow we can get rid of the variable and use the property directly and save a clock tick. We can also speed things up a bit by using the WITH/ENDWITH constructs.
*event timer If Not Used('trans1') USE trans1.dbf Alias trans1 Again In 0 Shared Endif SELECT trans1 WITH ThisForm.pageframe1.page1 IF EMPTY(.text4.value) .Grid1.visible=.f. ELSE WITH .Grid1 .visible=.t. SELECT TAlias1.time1,TAlias1.date1,TAlias1.roomno,TAlias1.place1,TAlias2.mobile,TAlias2.tel,TAlias2.empname, TAlias1.discerror,TAlias1.sno ; FROM trans1 TAlias1, emp1 TAlias2 ; WHERE TAlias1.empno = TAlias2.empno ; AND TAlias1.fexerno=val(ThisForm.pageframe1.page1.text4.value) AND mark1=0; ORDER BY date1,sno ; INTO table TAlias1 .RecordSource="TAlias1" WITH .column9 WITH .header1 .caption="ÑÞã ÇáÚØÜá" .fontsize=13 .fontbold=.t. ENDWITH .WIDTH=60 .Alignment = 2 .backcolor="255,0,128" ENDWITH WITH .column8 WITH .header1 .caption="äæÚ ÇáÚØÜá" .fontsize=13 .fontbold=.t. ENDWITH .WIDTH=60 .Alignment = 2 .backcolor="255,0,128" ENDWITH WITH .column7 WITH .header1 .caption="ÇÓã ÇáãæÙÝ" .fontsize=13 .fontbold=.t. ENDWITH .WIDTH=60 .Alignment = 2 .backcolor="255,0,128" ENDWITH WITH .column6 WITH .header1 .caption="åÇÊÝ ÇÑÖí" .fontsize=13 .fontbold=.t. ENDWITH .WIDTH=60 .Alignment = 2 .backcolor="255,0,128" ENDWITH WITH .column5 WITH .header1 .caption="åÇÊÝ Îáæí" .fontsize=13 .fontbold=.t. ENDWITH .WIDTH=60 .Alignment = 2 .backcolor="255,0,128" ENDWITH WITH .column4 WITH .header1 .caption=" ãæÞÚ ÇáÚØá" .fontsize=13 .fontbold=.t. ENDWITH .WIDTH=60 .Alignment = 2 .backcolor="255,0,128" ENDWITH WITH .column3 WITH .header1 .caption=" ÑÞã ÇáÛÑÝÉ" .fontsize=13 .fontbold=.t. ENDWITH .WIDTH=60 .Alignment = 2 .backcolor="255,0,128" ENDWITH WITH .column3 WITH .header1 .caption=" ÊÇÑíÎ ÇáÚØá" .fontsize=13 .fontbold=.t. ENDWITH .WIDTH=60 .Alignment = 2 .backcolor="255,0,128" ENDWITH WITH .column1 WITH .header1 .caption=" æÞÊ ÇáÊÈáíÛ" .fontsize=13 .fontbold=.t. ENDWITH .WIDTH=60 .Alignment = 2 .backcolor="255,0,128" ENDWITH GO TOP ENDWITH ENDIF ENDWITH