>That's about what I'm doing.
>The only thing I build my SQl statment in my source code
>
>ex.
>
>Initialy :
>SELECT * from MEMBER into cursor tmpMemebre
>Thisform.myGrid.RecordSourceType = 1
>Thisform.myGrid.RecordSource = 'tmpMemebre'
>
>Later :
>SELECT * from MEMBER M WHEER M.MemDate < DATE() into cursor tmpMemebre
>Thisform.myGrid.RecordSourceType = 1
>Thisform.myGrid.RecordSource = 'tmpMemebre'
>Thisform.myGrid.Refresh
>
>The grid never gets the control back, it just freezes
>I also tried, removing my Grig object and adding it back on the fly, same thing.
>
>
>
>
Haroutunian Antranik>
Yerevan, Armenia>
ADANA SOLUTIONS INC.
with this
.RecordsourceType= 3
.Recordsource = ;
"SELECT * from MEMBER mbr "+;
"WHERE Mbr.MemDate between thisform.StartDate and thisform.EndDate "+;
"into cursor tmpMemebre"
endwith
With a setting like this you could have dynamic recordsource. Have your StartDate and EndDate custom form properties initially set to {} and {^9999/12/31}. You could change Start and End dates on the fly and call :
thisform.myGrid.Refresh
Sometimes it wouldn't work and you'd get a blank grid (ie:MemDate is not indexed source table). Then try the alternative :
thisform.myGrid.RecordSource = thisform.myGrid.RecordSource
PS: Never use 'm' as an alias identifier. It's reserved for MemoryVariable.
Cetin