可以,用SQL语句非常好实现,如有二表,student,scores sql="select student.ID,scores.English from student,scores where student.ID=scores.ID" student和scores中都一相同字段,用他们来关联 rs.open sql,cnn set datagrid1.datasource=rs来显示
当然可以,用sql的多表查询就可以做 Dim strtmp as String strSQL = "select c.formcat3_name from tblformcat3 c ,tblformcat2 b where b.valid_flag = 1 and c.valid_flag = 1 and c.formcat2_code = b.formcat2_code and b.formcat2_name = " strSQL = strSQL & "'" & strtmp & "'" rst.open strSQL,conn
sql="select student.ID,scores.English from student,scores where student.ID=scores.ID"
student和scores中都一相同字段,用他们来关联
rs.open sql,cnn
set datagrid1.datasource=rs来显示
Dim strtmp as String
strSQL = "select c.formcat3_name from tblformcat3 c ,tblformcat2 b where b.valid_flag = 1 and c.valid_flag = 1 and c.formcat2_code = b.formcat2_code and b.formcat2_name = "
strSQL = strSQL & "'" & strtmp & "'"
rst.open strSQL,conn