Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共4 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:这组代码错误何在?请不吝赐教

1楼
yanzhen2010 发表于:2011/7/31 22:15:00

Dim Nu As String=CurrentTable.Current("编号")
Dim cm1 As WinForm.ComboBox = e.Form.Controls("ComboBox1")
Dim drs As List(Of DataRow)
drs = DataTables("长期医嘱").Select("[编号] >='Nu'")
For Each dr As DataRow In drs
    dr("住院号") = cm1
Next

 

[编号] 为字符型,ComboBox1为窗口住院号列表项目框,目的:将“编号”大于当前行“编号”的住院号统一设置为ComboBox1中选择的“住院号”。

[此贴子已经被作者于2011-7-31 22:21:17编辑过]
2楼
don 发表于:2011/7/31 22:34:00
Dim Nu ,s As String
nu =CurrentTable.Current("编号")
s = e.Form.Controls("ComboBox1").value
Dim drs As List(Of DataRow)
drs = DataTables("长期医嘱").Select("[编号] >='" & Nu &"'")
For Each dr As DataRow In drs
    dr("住院号") = s
Next
3楼
yanzhen2010 发表于:2011/7/31 22:40:00
谢谢朋友,代码正确。学习了。
4楼
blackzhu 发表于:2011/8/1 7:37:00
不是等于控件,是等于控件的值.关键是这一句:s = e.Form.Controls("ComboBox1").value
共4 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .01563 s, 2 queries.