您好,我上次理解错误了。
在FORM1中加如一下代码可在报表中显示选中的行。
Private Sub DataGrid1_Click()
DataEnvironment1.Commands.Item(1).CommandType = adCmdText
DataEnvironment1.Commands.Item(1).CommandText = "select * from 图书信息表 where 条形码= & DataGrid1.Columns(0) & "
End Sub
Private Sub DataGrid1_RowColChange(ByVal LastRow As Object, ByVal LastCol As Integer)
Call DataGrid1_Click()
End Sub