Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select statement
Message
De
12/09/2005 02:04:52
 
 
À
11/09/2005 13:25:26
Larry Long
ProgRes (Programming Resources)
Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Divers
Thread ID:
01048378
Message ID:
01048620
Vues:
15
hi,
thank you for reply,
i use set filter with my code after select it works,

i will try your code soon ,
thanks again

have anice day.
m.qasem
>Not sure if this will help but try adding
>thisform.grid1.RecordSource=''
>before your sql statement
>and
>thisform.grid1.RecordSource='laResults'
>after.
>
>Also, I noticed that you are populating text2 but using text5 in the sql.
>
>
>>hi all,
>>any idea ,help
>>i try as under to disply only what i select at mygrid1 via select statment,
>>i get all data from mytable ,
>>
>>
>>remark
>>&&& dvno numaric type,peri character type,dat character type
>>&&&VIA calander.olecontrol1
>>&&&thisform.text5.value= CMONTH(This.object.value)+' '+Str(year(This.object.value))
>>
>>
>>code
>>
>>set exac on
>>set near off
>>use  TABLE1 in 0
>>
>>thisform.text1.value= THISFORM.combo1.vALUE
>>thisform.text2.value=divi.no
>>
>>
>>***************
>>i try as
>>SELECT * FROM table1 WHERE dvno==THISFORM.TEXT2.VALUE  AND PERI==THISFORM.COMBO2.VALUE AND table1.dat==thisform.text5.value INTO ARRAY laResults
>>and as
>>SELECT * FROM table1 WHERE dvno==THISFORM.TEXT2.VALUE  AND PERI=THISFORM.COMBO2.VALUE AND table1.dat=thisform.text5.value INTO ARRAY laResults
>>****************
>>IF _TALLY > 0
>>THISFORM.GRID1.Visible= .T.
>>GO TOP
>>thisform.grid1.refresh
>>*******************************
>>select 3
>>LOCATE FOR    temp.mac1=alltrim(thisform.text1.value )
>>  thisform.text2.value=divi.no
>>  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"
>>RETURN
>>
>>*************************************
>>ELSE
>>=MESSAGEBOX("NOT found.....")
>>  thisform.COMMAND1.visible=.f.
>>thisform.grid2.visible=.F.
>>
>>thisform.grid1.refresh
>>endif
>>
>>
>>
>>thanks
>>m.qasem
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform