Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace1
Message
 
À
30/05/2005 04:04:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Divers
Thread ID:
01018482
Message ID:
01018486
Vues:
20
Macro substitution or Evaluate() will get you what you want...

Local lcFieldInTextbox
lcFieldInTextbox = thisform.text11.value

SELECT SUM(IIF(Evaluate(lcFieldInTextbox)=1,1,0)) AS CountOf1...

or

SELECT SUM(IIF(&lcFieldInTextbox = 1,1,0)) AS CountOf1...


>hi,
>thank you for reply,
>
>i have at my table fields as q1,q2,q3....etc
>
>i want to get result ex... for q1 or q2... as
>i insert at my thisform.text11.value=q1 or q2...
>
>
>>>hi all,
>>>any idea,help
>>>i need to replace yT.q1= ... with thisform.text11.value
>>>
>>>SELECT SUM(IIF(yT.q1=1,1,0)) AS CountOf1, ;
>>>SUM(IIF(yT.q1=2,1,0)) AS CountOf2, ;
>>>SUM(IIF(yT.q1=3,1,0)) AS CountOf3, ;
>>>SUM(IIF(yT.q1=4,1,0)) AS CountOf4, ;
>>>SUM(IIF(yT.q1=5,1,0)) AS CountOf5, ;
>>>SUM(IIF(yT.q1=6,1,0)) AS CountOf6, ;
>>>SUM(IIF(yT.q1=7,1,0)) AS CountOf7 ;
>>>FROM ttable1 yT INTO CURSOR someCursor
>>>
>>>thanks.
>>
>>Mohammed,
>>I don't uderstan youir question. What you want to do?
>>Do you want the SELECTed fields looks like this
>>.....
>>m.TextBoxValue = thisform.text11.value
>>
>>
>>SUM(IIF(m.TextBoxValue=7,1,0)) AS CountOf7 ;
>>....
>>
>>or you need something else.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform