Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fill mygrid
Message
From
14/01/2005 18:12:39
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00977370
Message ID:
00977395
Views:
29
hi,
how i can get data for one month only as(january) for mac1=thisform.text1.value,and if i get only i.e 19 days at my grid,i need to add 20,21,22...etc via mycode under
this code under keypres thisform.text1.value
thisform.Grid1.RecordSource = NULL
SELECT  * FROM TABLE1 where mac1=thisform.text1.value INTO CURSOR grdCursor
thisform.Grid1.RecordSource = "grdCursor"
thisform.Grid1.Refresh()
&&& this code under keypres event this.text8.value
if nkeycode=13
old_alias = ALIAS()
flag_use = .f.
IF .NOT. USED("Table1")
   SELECT 0
   USE table1
   flag_use = .t.
ENDIF


m.dat=thisform.text2.value
m.plan=thisform.text3.value
m.true=thisform.text4.value
m.hot=thisform.text5.value
m.balance=thisform.text6.value
m.mint=thisform.text7.value
m.other=thisform.text8.value
m.rem=thisform.text9.value
m.mac1=thisform.text1.value
append blank
gather memvar 

SUM CTOT(plan) - CTOT("00:00:00") to lnSec
* ? PADL(INT(lnSec/3600), 2, "0") + ":" + ;
				PADL(INT((lnSec%3600)/60),2, "0") + ":" + ;
				PADL(lnSec % 60,2, "0")

SUM VAL(LEFT(plan,2))*3600 + ;
	VAL(SUBSTR(plan,4,2))*60 + ;
	VAL(RIGHT(plan,2)) TO lnSec

THISFORM.TEXT10.VALUE= PADL(INT(lnSec/3600), 2, "0") + ":" + ;
				PADL(INT((lnSec%3600)/60),2, "0")  

*				lnCost=thisform.text3.value
*THISFORM.TEXT10.VALUE = ROUND(lnSec/3600*lnCost,2)
SUM CTOT(true) - CTOT("00:00:00") to lnSec
* ? PADL(INT(lnSec/3600), 2, "0") + ":" + ;
				PADL(INT((lnSec%3600)/60),2, "0") + ":" + ;
				PADL(lnSec % 60,2, "0")

SUM VAL(LEFT(true,2))*3600 + ;
	VAL(SUBSTR(true,4,2))*60 + ;
	VAL(RIGHT(true,2)) TO lnSec

THISFORM.TEXT11.VALUE= PADL(INT(lnSec/3600), 2, "0") + ":" + ;
				PADL(INT((lnSec%3600)/60),2, "0")  

thisform.refresh

IF flag_use
   USE IN table1
ENDIF

IF .NOT. EMPTY(old_alias)
   SELECT (old_alias)
ENDIF

endif
thanks.

>
>thisform.Grid1.RecordSource = NULL
>SELECT MAX(DAT) FROM TABLE1 where mac1=thisform.text1.value INTO CURSOR grdCursor
>thisform.Grid1.RecordSource = "grdCursor"
>thisform.Grid1.Refresh()
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform