点击MSFLEXGRID1后,会返回一个属性,(ROW,COL)是你所点的单元格的行与列值,你可以取得ID值,然后根据ID找出对应的另一个表的信息,查找后将记录集赋给另一个MSFLEXGRID就可以了 比如: rs.open "select * from table where field=msflexgrid1.TextMatrix(ID所在的行,列)" set mshflexgrid2.datasource=rs
代码放在msflexgrid_entercell()中 “select * from table where id=”& val(msflexgrid.TextMatrix(row,col)
谢谢各位对我的解答。不过以上执行还是有错误的。我现在已经实现了我所要解答的问题。代码如下: mrc.Open "select * from table where Id = '" & flgGrid.Clip & "'"
比如:
rs.open "select * from table where field=msflexgrid1.TextMatrix(ID所在的行,列)"
set mshflexgrid2.datasource=rs
“select * from table where id=”& val(msflexgrid.TextMatrix(row,col)
mrc.Open "select * from table where Id = '" & flgGrid.Clip & "'"
Form1.Data1.Recordset.FindFirst CStr("代金券号 like '" & MS1 & "'")
Form1.SetFocus