编程论坛's Archiver

mrsunny 发表于 2007-8-6 15:50

实在是恼火,想了好久,思想和代码都没有问题,为什么取不到值呢?

<DIV class=htmlcode>
<P>for li_1=1 to ids_BOm_small.rowcount()<BR>    ls_1=ids_BOm_small.getitemstring(li_1,"mtr_code")<BR><BR>  for li_2=1 to dw_1.rowcount()<BR>        ls_2=dw_1.getitemstring(li_2,"bjjh")<BR>        messagebox("",string(ls_2=ls_1)+ls_2+ls_1+"-"+string(li_2))<BR>        if ls_2=ls_1 then exit<BR>        select getdate() into :id_gettime from UserList using sunnyerp; <BR><BR>  next<BR><BR>next</P></DIV><BR>  以上代码想把一个数据窗口的值读到另一个数据窗口,并过滤重复的值,用到了两个循环,可我所取到的ls_2的值始终不正确,把相同意思的代码加到按钮的chenk!事件中,取值一切正常,我都看不出来它是到什么地方取的值 ,朋友们,帮我分析一下是什么原因?或者有没有更好的办法达到同样的效果?

sam2080 发表于 2007-8-7 19:34

<P>楼主在什么事件写?<BR>把rowcount()赋给一个变量来试试看</P>

mrsunny 发表于 2007-8-7 23:05

回复:(mrsunny)实在是恼火,想了好久,思想和代码都...

<P>都是写到按钮的check事件中的,我不但试了变量,还试了直接从for i = 1 to 6都不行,真的找不到原因了!</P>

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.