Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
New method
Message
De
26/04/2005 04:48:47
 
 
À
25/04/2005 03:45:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 5
Database:
Visual FoxPro
Divers
Thread ID:
01007918
Message ID:
01008362
Vues:
19
hi,
thank you very much,
i try again via this code as under ,it works
i creat new method al1, insert my code in to al1 as under
REPLACE sum1 WITH d1 + d2 + d3+d4+d5+d6+d7+d8+d9+d10
REPLACE sum2 WITH d11 + d22 + d33+d44+d55+d66+d77+d88+d99
if sum1=0 or sum2 =0
    replace sum3 with 0
else
  if  sum1<0 or sum2 <0
    = messagebox("this is rong")
  else
    replace sum3 with (sum2/sum1)*100
 endif
endif
via AfterRowColChange event
i put thisform.al1 with another code at the start code as under
to run the method.
my mistake i put thisform.al1 at the end of the code,
it must be in the bigining .
thisform.al1&&& this is ok

 thisform.text4.value=thisform.grid1.column2.text1.value
   select  mac1
 locate for nam=upper(alltrim(thisform.text4.value))
 thisform.text2.value=mac1.dvno
 select temp
thisform.grid2.visible=.t.
thisform.Grid2.RecordSource=SPACE(0)
select nam,macwork1 from mac1;
         where dvno = thisform.text2.Value ;
      into cursor crsMyCursor
thisform.Grid2.RecordSource="crsMyCursor"
thanks again
best regards.
m.qasem

>The AfterRowColChange event is an event of the grid, so you will only need to have the code in one place!!! Your error message, "variable'sum' is not found", means you have a typo, because the word "sum" is not in your code here.
>
>>hi,
>>thank you,
>>remark:- i can tested under vfp5 or vfp7 or vfp8
>>i try twise under form and ander grid1 i get error message
>>variable'sum' is not found,
>>
>>but when i use it at mygrid under thisform.grid1.column1.text1 && it is ok
>>
>>but have 31 columns as days
>>that is mean i must repeate the code under all columns,this is the problem,
>>
>>i look to another way to do that.
>>
>>b.regards.
>>m.qasem
>>
>>
>>>Put your code in the AfterRowColChange event.
>>>
>>>>hi all,
>>>>
>>>>i need help to run this code under ,for evry keypress at mygrid
>>>>mean run my code, if i move from column to onther,for evry column,
>>>>
>>>>maybe as new method , i try but no error message and no result,
>>>>
>>>>
>>>>REPLACE sum1 WITH d1 + d2 + d3+d4+d5+d6+d7+d8+d9+d10
>>>>REPLACE sum2 WITH d11 + d22 + d33+d44+d55+d66+d77+d88+d99
>>>>if sum1=0 or sum2 =0
>>>>    replace sum3 with 0
>>>>else
>>>>  if  sum1<0 or sum2 <0
>>>>    = messagebox("this is rong")
>>>>  else
>>>>    replace sum3 with (sum2/sum1)*100
>>>> endif
>>>>endif
>>>>
>>>>
>>>>thanks.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform