Foxtable(狐表)用户栏目专家坐堂 → 为啥无法引用全局变量


  共有2050人关注过本帖树形打印复制链接

主题:为啥无法引用全局变量

美女呀,离线,留言给我吧!
susu312
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:四尾狐 帖子:997 积分:6752 威望:0 精华:0 注册:2018/6/8 16:17:00
为啥无法引用全局变量  发帖心情 Post By:2018/9/26 19:40:00 [显示全部帖子]

''定义临时变量
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

 

那个是全局变量, 但是无法引用为啥呀


 回到顶部