设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 3387|回复: 5
打印 上一主题 下一主题

[报表] 求教报表字段跳过空值(或0值)排列问题(已解决)

[复制链接]
1#
发表于 2011-4-8 09:43:09 | 显示全部楼层
本帖最后由 todaynew 于 2011-4-8 09:44 编辑

function vallist() as string
dim rs as new adodb.recordset
dim i as long,j as long
rs.Open "你的数据表名称", CurrentProject.Connection, adOpenKeyset, adLockOptimistic
for i=1 to rs.recordcount
      fro j=0 to rs.fileds.count-1
           if rs.filds(j).name="数据1" or rs.filds(j).name="数据2" or rs.filds(j).name="数据3"  then
                if nz(rs.filds(j).value,0)<>0 then
                      vallist=vallist & rs.filds(j).value & ";"
                end if
          end if
     next
    rs.movenext
next
end function
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-5-11 13:14 , Processed in 0.100236 second(s), 23 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表