Page 1 of 1

alltrim argument error

Posted: Sun Feb 18, 2007 5:18 am
by Ehab Samir Aziz
editmach module goes well with with lAppend=.f. (update option ) but with lAppend=.t. (New record) I had the alltrim argument error message.

Code: Select all


static function Editmach(oLbx,lAppend) 
//------------------------------------------ 
.. 
Local V_ct_strd:=ctod("  /  /    ") 
Local V_ct_endd:=ctod("  /  /    ") 
.. 
   DEFAULT lAppend := .f. 
.. 
if lAppend 
   GOTO BOTTOM 
   SKIP 
else 
   goto nOldRec 
V_ct_strd   :=dtoc(mach->MC_CT_strd) 
V_ct_endd   :=dtoc(mach->MC_CT_endd) 

endif 




   DEFINE DIALOG oDlg FROM 0, 0 TO 650, 1000 PIXEL; 
      TITLE If( lAppend, "New Machine", "Machine Update" ) 


   @ 1,1 SAY "&Account No." OF oDlg PIXEL 
   @ 1,50 SAY ":" OF oDlg PIXEL 
   @ 1,60 COMBOBOX V_CU_ACCT ITEMS aBase1(3,"mach",256,"mc_cu_acct") size 80,80 OF oDlg PIXEL 


   @ 1,150 SAY "&Name" OF oDlg PIXEL 
   @ 1,180 SAY ":" OF oDlg PIXEL 
   @ 1,190 COMBOBOX V_CU_NAME ITEMS aBase1(3,"mach",256,"mc_cu_name") size 150,120 OF oDlg PIXEL 


   @ 15, 1 SAY "Contract Name" OF oDlg PIXEL 
   @ 15, 50 SAY ":" OF oDlg PIXEL 
   @ 15,60 COMBOBOX V_ct_ctna ITEMS aBase1(3,"mach",256,"mc_ct_ctna") size 80,80 OF oDlg PIXEL 

   @ 15, 150 SAY "Start Date" OF oDlg PIXEL 
   @ 15, 180 SAY ":" OF oDlg PIXEL 
   @ 15, 190 COMBOBOX (V_ct_strd) ITEMS aBase1(3,"mach",256,"mc_ct_strd") size 80,80 OF oDlg PIXEL 


   @ 15, 300 SAY "End Date" OF oDlg PIXEL 
   @ 15, 350 SAY ":" OF oDlg PIXEL 
   @ 15, 360 COMBOBOX (V_ct_endd) ITEMS aBase1(3,"mach",256,"mc_ct_endd") size 80,80 OF oDlg PIXEL 
.. 
..