My be, you forgot quotations?
>
>thisform.myGrid.column1.controlsource="myTable.field5"
>
>Hi all,
>
>I can load the table into the grid now, but no matter using RecordSourceType as table or as alias, it automatically reset to show all fields, and if I try to use code to change it to specfic fields that I want to display, it will mess up.
>
>forexample, the grid want to dislpay the first field of the record in column1, but I have such code:
>
>thisform.myGrid.column1.controlsource=myTable.field5
>
>
>since I set it to dislpay field 5, and it want to display field 1, turn out it disabled the grid cell and makes it a grey box :-(
>
>I wish I have declare the problem clearly, how can I set the grid to display specfic fields as I like programmtically?
>
>Thanks in advance!!
>
>Jimi