Foxtable(狐表)用户栏目专家坐堂 → [求助]各位高手,代码有错?


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

主题:[求助]各位高手,代码有错?

帅哥哟,离线,有人找我吗?
XYT
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1418 积分:7167 威望:0 精华:0 注册:2013/3/18 8:37:00
  发帖心情 Post By:2013/4/18 15:19:00 [显示全部帖子]

Dim dt As DataTable

Dim cmd As new SQLCommand

Dim ids As String

Dim box2 As WinForm.ComboBox= e.Form.Controls("ComboBox2")

Dim m As Byte = cbyte (box2.text)

cmd.CommandText = "Select [_Identify],部门,姓名,出生年月 From {基本信息} where month(出生年月)=" & m

  dt = cmd.ExecuteReader

For Each dr As DataRow In dt.dataRows

  ids = ids & "," & dr("_identify") 

Next

  ids = "(" & ids.trim(",") & ")"

  ids =  "Select [_Identify],部门,姓名,出生年月 From {基本信息} Where [_Identify] in " & ids 

  Tables("本月生日员工_Table1").Fill(ids,"",False)

  Tables("本月生日员工_Table1").AllowEdit = False

帮你贴出来了

 

<!--EndFragment-->
[此贴子已经被作者于2013-4-18 15:19:29编辑过]

 回到顶部