How about instead of SQL string to use an alias for the RecordSource and re-run the query?
>I have a form that contains two grids. The first grid is populated with data when the form loads. The second grid is populated when a user selects an item from grid1. In the click event of grid1 I call the refresh event of grid2. I set the recordsource equal to a sql statement in the refresh event of grid2 and have the recordsourcetype = SQL. Everything works great in my test environment but when I try it out on a different computer the grid2 does not get populated. Any suggestions would be greatly appreciated.
>
>
>*****Grid1.Click()******
>
>thisform.pageframe1.page1.grid2.refresh()
>
>
>
>*****Grid2.Refresh()*****
>
>this.HighlightStyle = 1
>
>this.RecordSource = "SELECT PADR(shapeconv(a.desc,a.dim1,a.dim2,a.dim3,a.misjunk),25) AS section,a.qty,"+;
> "a.len_ft,fractionconv(a.len_in) as inches,a.porder,a.popage,a.poline,a.len_in,a.pcid,"+;
> ".f. as selected "+;
> "FROM inventory a INTO CURSOR curSelections WHERE !DELETED() AND EMPTY(a.recvdate) and "+;
> "a.porder IN (SELECT b.porder from curPorder b WHERE b.selected = .T.) "+;
> "ORDER BY 5,6,7,1,3,4 READWRITE"
>
>
>
>
>
>
>Thanks in advance,
>Russell
If it's not broken, fix it until it is.
My Blog