Dim xh As WinForm.TextBox = e.Forms.Controls("TextBox1")
DataTables("班级成绩表").LoadFilter = "学号 = '" & xh.Value & "'"
DataTables("班级成绩表").LoadTop = 1
DataTables("班级成绩表").Load
Tables("班级成绩表").Filter = "学号 = '" & xh.Value & "'"
也可以这样:
Dim xh As WinForm.TextBox = e.Forms.Controls("TextBox1")
Dim dr As DataRow = DataTables("班级成绩表").Find("学号 = '" & xh.Value & "'")
Dim xm As WinForm.TextBox = e.Forms.Controls("TextBox5")
Dim bj As WinForm.TextBox = e.Forms.Controls("TextBox4")
xm.Value = dr("姓名")
bj.Value = dr("班级")