Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fill mygrid
Message
 
À
15/01/2005 12:43:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00977370
Message ID:
00977487
Vues:
32
I am not sure if I understand second half of Your question.
But about first one:
thisform.Grid1.RecordSource = NULL
cPeriod = LEFT(DTOS(thisform.text2.value),6)
SELECT * FROM TABLE1 WHERE mac1=thisform.text1.value .AND. LEFT(DTOS(Table1.Dat),6) == m.cPeriod ORDER BY DTOS(Table1.Dat) INTO CURSOR grdCursor READWRITE
mntLastDay = (GOMONTH(thisform.text2.value, 1) - thisform.text2.value)
SELECT grdCursor
GO BOTTOM

FOR nDay = DAY(grdCursor.Dat)+1 TO mntLastDay
    INSERT INTO grdCursor (Dat) VALUES (DATE(YEAR(thisform.text2.value),MONTH(thisform.text2.value),nDay)
NEXT
thisform.Grid1.RecordSource = "grdCursor"
thisform.Grid1.Refresh()
>hi,
>thank you so much,
>myfield DAT have date as 28/02/2005
>i need to get all data from my table to mygrid where mac1=thisform.text1.value and DAT=month+year(thisform.text2.value),
>and after that i can add new record via e.i text3,text4,text5,text6,text7,text8 .at text8 i put mycode as append blank
>thanks.
>
>
>>Mohhamed if I don't know the structure of Table1 I can't help You. May be something like this:
>>
>>
>>thisform.Grid1.RecordSource = NULL
>>SELECT * FROM TABLE1 WHERE mac1=thisform.text1.value .AND. Table1.nMonth == 1 ORDER BY Table1.nDay INTO CURSOR grdCursor READWRITE
>>mntLastDay = DATE(grdCursor.nYear, grdCursor.nMonth, 1)
>>mntLastDay = (GOMONTH(mntLastDay,1) - mntLastDay)
>>SELECT grdCursor
>>FOR nDay = grdCursor.nDay+1 TO mntLastDay
>>    INSERT INTO grdCursor (nDay) VALUES (nDay)
>>NEXT
>>thisform.Grid1.RecordSource = "grdCursor"
>>thisform.Grid1.Refresh()
>>
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform