Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
If found()
Message
From
14/08/2007 04:19:14
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
 
 
To
14/08/2007 03:58:22
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01247979
Message ID:
01247980
Views:
14
>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
LOCATE FOR MyTable.MyDateColumn = dat
>         IF FOUND( "MyTable" )
>**********************************
>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
>
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform