# 如何传递RDO CONTROL(MSRDC1)到Module

Posted by linda on August 05, 1997 at 04:09:41:

请问如何将一个RDO的rdo control传递至module中?程式码如下:

Private Sub Form_Load() '开启SQL资料库
'On Error GoTo Error_Handle:
ACCm1.Visible = False
Gsql = "select * from department where depar_id = '****' "
Set rs = Pdb.OpenResultset(Gsql, rdOpenKeyset)
Set Data1.Resultset = rs
Data1.Refresh
Call Pform_entry_flag("ACCa101", ACC.txtUser_id, Prog_add, Prog_upd, Prog_del, Prog_qry)
Call P_ButtonInitialMode(ACCa101, Data1, Prog_add, Prog_upd, Prog_del, Prog_qry, 3)
...............

module内容如下:

Public Sub P_ButtonInitialMode(Pform As Object, Pdata As Control, Padd As String, Pupd As String, Pdel As String, Pqry As String, Pbrowse_print As Integer)
If Pqry = "Y" Then Pform.sscQuery.Enabled = True
If Pdata.rdoResultset.RowCount = 0 Then 'rdoresultset 没有资料
--------------------

但当我执行时,它告诉我物件不支援此属性或方法,在DAO时就可以,请问是否
要多设些什么?谢谢!

Follow Ups:

- 可以啊! 小吴 19:05:19 8/05/97 (0)