''定义临时变量
Dim dr As DataRow
''设置控件不可用
e.Form.Controls("userOrgan").Enabled = False
e.Form.Controls("userRole").Enabled = False
e.Form.Controls("userName").Enabled = False
''设置窗口标题值
e.Form.Text = e.Form.Text & "-" & _UserName
''从数据库提取
dr = DataTables("user").SQLFind(" userName = '" & _UserName & "' and organName = '"& _UserOrgan &"' and userRole = '"& _UserRole &"'")
If dr IsNot Nothing Then
e.Form.Controls("userOrgan").Value= dr("organName")
e.Form.Controls("userRole").Value=dr("userRole")
e.Form.Controls("userName").Value=dr("userName")
e.Form.Controls("userPassword").Value=dr("userPassword")
Else
MessageBox.Show("用户不存在或者已经被删除!","提示",MessageBoxButtons.OK)
e.Form.Close()
End If
那个是全局变量, 但是无法引用为啥呀