Rss & SiteMap

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

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

标题:[求助]如何同时清除多列的内容?

1楼
飞鱼 发表于:2010/9/29 11:57:00
在datacolchanged事件中,如果一个datarow中有10多个列,只想保留一列的内容,清除其他所有列,我现在是一个一个使用"=Nothing",比如,dr("a")=nothing,dr("b")=nothing,.......,觉得麻烦,于是自己试了下dr("a","b","c","d")=nothing,提示错误,有没有方便的办法?
2楼
mr725 发表于:2010/9/29 12:23:00

for each c as datacol in datatables("ttt").datacols

  currenttable.current(c.name) = nothing

next

3楼
飞鱼 发表于:2010/9/29 12:29:00
以下是引用mr725在2010-9-29 12:23:00的发言:

for each c as datacol in datatables("ttt").datacols

  currenttable.current(c.name) = nothing

next

这样不是把所有的列内容都清了么?可我想保留其中一列呢.

4楼
czy 发表于:2010/9/29 12:43:00

加个判断不就行了。

if c.name  <> "某列"

currenttable.current(c.name) = nothing

end if

共4 条记录, 每页显示 10 条, 页签: [1]

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

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