Gerald,
>Hi. Could you try
>
>ThisForm.Grid.RecordSource = ["] + lcfile + ["] && name of Cusrsor
>
>Basically, add quotes around the text.
>
You may try thisform.grid.Requery() after thisform.Grid.RecordSource=CursorName.
BTW, in my class I have a property CursorName, which I set in the design time, but you can easily expand this functionality and pass the CursorName as a parameter in InitMethod. Take a look into Files section.
>
>
>>Hi.
>>I am calling a Display Form from my main form. In my display form, I just want to display the contents of a cursor which has been created in the Main Form. This cursor has a unique name so will be different every time.
>>
>>In my Display Form, I have a grid whose RecorSource =' ' and RecorSourceType = 0 (Table).
>>In the Init of the form, I pass the name of the Cursor and do the following:
>>
>>ThisForm.Grid.RecordSource = lcfile && name of Cusrsor
>>
>>...but nothing appears in the grid
>>
>>I know grids can be awkward if you change their RecordSource but is there something wrong with waht I am doing ?
>>
>>Regards,
>>
>>Gerard
If it's not broken, fix it until it is.
My Blog