http://www.foxcn.com/bbs/BbsView.aspx?BoardId=1&InfoID=3441&page=1
试试以下代码:
USE bm IN 0 ALIAS bm2
组合框.RowSource: bm2
错了,rowsourcetype选字段
rowsource选tablename.fieldname1,fieldname2
注意,因为你有两个字段,第一个字段名前加别名,第二个前不要加
取部門時試試不要掛實表,用SQL,或掛臨時表
我比照做了,没有出现你说的问题呀
有什么错误吗?我试过了,一切正常。rowsourcetype=2-别名.
將部門編號控件的rowsourcetype用數組,最好定義一個部門編號類
類的init 事件中加入,rsa是類里新建的數組
local dpoped,nworkarea
nworkarea=select()
if used("bm")
sele bm
dpopen=.T.
else
sele 0
use bm noupdate
dpopen=.F.
endif
sele 部门号,部门名 from bm into array this.rsa order by 部门号
if !dpopen
sele bm
use
endif
this.rowsource="this.rsa"
this.requery
sele (nworkarea)