写positionChanged事件,代码
Dim fdr As DataRow = DataTables("表A").Find("第二列 = '" & e.Table.Current("第一列") & "'")
If fdr IsNot Nothing Then
e.Form.Controls("Label1").Text = fdr("第二列")
e.Form.Controls("Label2").Text = fdr("第三列")
e.Form.Controls("Label3").Text = fdr("第四列")
e.Form.Controls("Label4").Text = fdr("第五列")
e.Form.Controls("Label5").Text = fdr("第六列")
e.Form.Controls("Label6").Text = fdr("第七列")
e.Form.Controls("Label7").Text = fdr("第八列")
Else
e.Form.Controls("Label1").Text = Nothing
e.Form.Controls("Label2").Text = Nothing
e.Form.Controls("Label3").Text = Nothing
e.Form.Controls("Label4").Text = Nothing
e.Form.Controls("Label5").Text = Nothing
e.Form.Controls("Label6").Text = Nothing
e.Form.Controls("Label7").Text = Nothing
End If