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