[此贴子已经被作者于2007-5-12 22:42:36编辑过]
哈哈,成功了,弄了一晚上哦.
这只是我的方法,能用担不是好方法.
图中左边为list1 右边为list2
在表单init事件中添加代码:(*表示表或表中的字段)
select *
goto bottom
m=recno()
goto top
for s=1 to m
thisform.list2.additem(*)
skip 1
endfor
thisform.refresh
<<按钮代码:
aa=thisform.list2.listcount
for s=1 to aa
thisform.list2.listitemid=s
thisform.list1.additem(thisform.list2.value)
endfor
thisform.list2.clear
thisform.refresh
<按钮代码:
aa=thisform.list2.listitemid
if aa=0
else
thisform.list1.additem(thisform.list2.value)
thisform.list2.removelistitem(aa)
endif
thisform.refresh
>按钮代码:
aa=thisform.list1.listitemid
if aa=0
else
thisform.list2.additem(thisform.list1.value)
thisform.list1.removelistitem(aa)
endif
thisform.refresh
>>按钮代码:
aa=thisform.list1.listcount
for s=1 to aa
thisform.list1.listitemid=s
thisform.list2.additem(thisform.list1.value)
endfor
thisform.list1.clear
thisform.refresh