设置数据源的方法?
OPEN DATABASE "datas\材料管理"currentUserID=2
runShouliaoForm()
SET DATABASE TO "材料管理"
CLOSE DATABASES
PROCEDURE runShouliaoForm
PUBLIC shouliaoForm
shouliaoForm=CREATEOBJECT("m1Form")
shouliaoForm.show
READ EVENTS
RETURN
ENDPROC
DEFINE CLASS m1Form as myForm
ADD OBJECT zhangdanLabel as label
ADD OBJECT slrqLabel as label
ADD OBJECT gydwCbx as comboBox
PROCEDURE load
IF !USED("收料明细")
USE "收料明细" IN 2
ENDIF
IF !USED("供应单位")
USE "供应单位" IN 7
ENDIF
ENDPROC
PROCEDURE myAddNew()
ltCurrTime=DATETIME()
this.zhangdanLabel.caption='S1'+STRTRAN(STRTRAN(STRTRAN(TTOc(ltCurrTime),':',''),'.',''),' ','')
this.slrqLabel.caption=TTOc(ltCurrTime)
ENDPROC
PROCEDURE myQuery()
this.zhangdanLabel.caption=收料明细.收料单号
this.slrqLabel.caption=TTOC(收料明细.收料时间)
SELECT 单位全称 FROM 供应单位 WHERE 供应编号=;
(select 供应单位 from 收料明细 where 收料单号=this.zhangdanLabel.caption) INTO ARRAY tempA1
thisform.gydwCbx.value=tempA1()
ENDPROC
PROCEDURE gydwCbx.init
thisform.gydwCbx.controlSource=供应单位
thisform.gydwCbx.rowSourceType=6
thisform.gydwCbx.rowSource='供应单位.单位全称'
ENDPROC
PROCEDURE init
SELECT "收料明细"
GO BOTTOM
IF BOF()
MESSAGEBOX("数据库是空的!现在进入添加状态!",64)
this.queryMode=.f.
this.myAddNew()
ELSE
this.queryMode=.t.
SELECT "收料明细"
GO BOTTOM
SKIP -1
this.myQuery()
ENDIF
ENDPROC
PROCEDURE unload
IF USED("收料明细")
USE IN "收料明细"
ENDIF
IF USED("供应单位")
USE IN "供应单位"
ENDIF
ENDPROC
ENDDEFINE
设置下拉列表框的数据源是“供应单位.单位全称”
并将根据“收料明细.收料单号”查询的单位全称,作为下拉列表框的当前显示值
这需要怎么做呢?