Mohammed,
Did You have a field named "Nam" in the table/cursor/view that is a recordsource of the Grid? What the name of the Grid is? Is it Grid1, if so use:
this.ReadOnly = thisform.Grid1.RecordSource.Nam=='PRIVATE'
this.ReadOnly = this.RecordSource.Nam=='PRIVATE'
>hi,
>
>i get error message(object Grid1 is not found)
>
>this.ReadOnly = Grid1.RecordSource.NAm=='PRIVATE'
>
>
>what the defferent between this code abov, and properties(grid1.column1.header1.text1)
>properties read only =.t.
>thanks.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.