全局代码public _dict as dictionary(of string,string)
afteropenproject事件
_dict= new dictionary(of string,string)
_dict.add("民族","教工姓名")
_dict.add("身份证号","民族")
……其它自行补充完整
窗口全局代码Enter
if _dict.containskey(e.Sender.Name)
If e.Form.Controls(_dict(e.Sender.Name)).Value Is Nothing Then
e.Form.Controls(_dict(e.Sender.Name)).Select
End If
end if