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


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

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

美女呀,离线,留言给我吧!
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

 

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


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/9/26 19:49:00 [只看该作者]

1、你说的无法引用,指什么?报错?还是没有值?

 

2、msgbox(_userName)弹出什么?


 回到顶部