Rss & SiteMap

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

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

标题:代码求助

1楼
bm 发表于:2011/11/8 11:52:00

数据表aftercheckrow事件。最好可以选中后解锁行,清除选中后锁定行

 

 

 

 For Each r As Row In Tables("支出明细").Rows
    If r.Checked = True Then
Dim Result As DialogResult
            Result = MessageBox.Show("确定需要更改数据吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
            If Result = DialogResult.yes Then
    Tables("支出明细").Current.Locked = False
    If Result = DialogResult.No Then
    r.Checked = False
     End If
    End If
 End If
Next

黄颜色部分的代码不管用。

[此贴子已经被作者于2011-11-8 11:54:06编辑过]
2楼
bm 发表于:2011/11/8 13:31:00
自己顶一下。
3楼
blackzhu 发表于:2011/11/8 14:08:00
For Each r As Row In Tables("支出明细").Rows
    If r.Checked = True Then
Dim Result As DialogResult
            Result = MessageBox.Show("确定需要更改数据吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
            If Result = DialogResult.yes Then
    Tables("支出明细").Current.Locked = False 
    else
    r.Checked = False
     End If
    End If
 End If
Next

用否则试试?
4楼
bm 发表于:2011/11/8 14:28:00
谢谢。好用
5楼
bm 发表于:2011/11/8 14:46:00
这个代码好像是针对整个表的。能否改成只针对当前行
6楼
狐狸爸爸 发表于:2011/11/8 14:51:00

简单,你看看这个事件:

 

http://www.foxtable.com/help/topics/1640.htm

 

 

If e.Row.Checked = True Then
    Dim Result As DialogResult
    Result = MessageBox.Show("确定需要更改数据吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
    If Result = DialogResult.yes Then
        e.Row.Locked = False
    Else
        e.Row.Checked = False
    End If
End If

7楼
bm 发表于:2011/11/8 15:30:00
好用
共7 条记录, 每页显示 10 条, 页签: [1]

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

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