Raymond, try this:
PROCEDURE MyGrid.Init
IF NOT USED('mytable')
USE mytable IN 0
ENDIF
WITH THIS
.RecordSource = 'mytable'
.Column1.ControlSource = 'mytable.field1'
.Column2.ControlSource = 'mytable.field2'
ENDWITH
SELECT mytable
ENDPROC
Sometimes (yes, it's weird and unpredictable), the grid object is build before the Load event; so if you want to play safe, either use DataEnvironment or write the grid properties on Init right after you open the table.
HTH
>I would like to know if anyone trying these steps gets the same problem I have.
>
>1) Create a form class based on form with a grid on it.
>2) create a form based on your form class.
>3) open a table in the load method.
>4) set the grid RecordSource and column ControlSource.
>5) run form.
>
>I get:
>Error loading file - record 3 etc....
>
>If I open the table in the Data Environment the form runs fine.
>
>Is this a bug in 6.0?
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only