Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
If found()
Message
De
14/08/2007 03:58:22
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
If found()
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01247979
Message ID:
01247979
Vues:
65
hi all,

i try to display mygrid if date found at my tabel via this code ... but it works all the time...found or not.
thanks for help.
SET ENGINEBEHAVIOR 70

thisform.olecontrol1.Visible=.t.

thisform.grid1.Visible=.f.

LOCAL ldStart 
ldStart = thisform.text1.value 
*************************************
LOCATE FOR ldStart=dat&&&& bad thinking
         IF FOUND()
**********************************
SELECT nam,amount,bank,sheqno,dat,tra, SUM(amount) AS bill_total FROM Mstr ;
WHERE dat= ldStart ;
GROUP BY nam,amount,bank,sheqno,dat ;
      ORDER BY sheqno INTO CURSOR qTmp
      
SELECT csrBillTotals 
ZAP
APPEND FROM DBF( [qTmp] )
go top

  SELECT csrBillTotals 
ZAP
APPEND FROM DBF( [qTmp] )
Thisform.refresh()
    * thisform.grid1.column1.header1.forecolor='255,255,0'
     thisform.grid1.column1.header1.caption="ÊÇÑíÎ ÇáÔíß"
     thisform.grid1.column1.header1.fontsize=12
     thisform.grid1.column1.WIDTH=88
     thisform.grid1.column1.header1.fontbold=.t.
     thisform.grid1.column1.Alignment = 2
  backcolor="128,128,255"
  
    thisform.grid1.column2.header1.caption="ÑÞã ÇáÔíß"
     thisform.grid1.column2.header1.fontsize=12
     thisform.grid1.column2.WIDTH=88
   thisform.grid1.column2.header1.fontbold=.t.
   thisform.grid1.column2.Alignment = 2
  backcolor="128,128,255"
  
  
  
   thisform.grid1.column3.header1.caption="ãÓÍæÈ Úáì"
     thisform.grid1.column3.header1.fontsize=12
     thisform.grid1.column3.WIDTH=88
   thisform.grid1.column3.header1.fontbold=.t.
   thisform.grid1.column3.Alignment = 2
 backcolor="128,128,255"
  
  thisform.grid1.column4.header1.caption="ÞíãÉ ÇáÔíß"
  thisform.grid1.column4.header1.fontsize=12
  thisform.grid1.column4.WIDTH=88
  thisform.grid1.column4.header1.fontbold=.t.
  thisform.grid1.column4.Alignment = 2
  backcolor="128,128,255"
  
  thisform.grid1.column5.header1.caption="ÇÓã ÇáãÓÊÝíÏ"
  thisform.grid1.column5.header1.fontsize=12
  thisform.grid1.column5.WIDTH=120
  thisform.grid1.column5.header1.fontbold=.t.
  thisform.grid1.column5.Alignment = 2
  backcolor="128,128,255"
  else
  thisform.grid1.Visible=.f.
  endif
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform