|
3#
楼主 |
发表于 2006-10-30 18:01:00
|
只看该作者
您好!感谢您在繁忙中给我的回复。
由于我对access了解不深,对于您的简约回答领悟不够,还是不能进行添加操作,恳请您能将具体的设置说的详细一些。
我按您的“如果是手工添加,可直接将窗体拖到菜单上就可以了”操作,是否是指将主窗体打开(或进入设计视图),然后将我的窗体“AAA”拖到主窗体上去即可?操作失败,结果出现提示:“是否永久性删除 窗体‘AAA’?”(或将窗体AAA的内容全部拖到主窗体的设计视图中),详细见图1(或图2)。还请您能再次指教。
我按您的“是用代码,则可设置Onaction函数”操作,由于对代码不熟,我想在您的代码中找到该代码进行修改即可,但原代码中并没有“Onaction”函数,没地方改,自己又不知道往哪里进行添加,还请您能再次指教。
另外,您所指的代码是否是指将主窗体进入设计视图,然后右键单击树形部份的事件生成器后,有如下代码:
'*-----------------------Çá»êACCESSÔ´ÂëÇø----------------------------*
'| µç×ÓÐÅÏä:support@zsjys.com .--. |
'| tmtony@21cn.com ." o \__ |
'| Ö÷Ò³µØÖ·:www.zstmcomputer.com _.-" ,( ` |
'| tmcomputer.yeah.net _.-" ,;;| |
'| _.-=" _," ,,;;;' |
'| .-"`_.-"``-..,,;;;;:' |
'*----------------------------`"'`----------`\`\---------------------*
'*---------------------------------------- /^\\\ support@zsjys.com
'*---Ìì´óÊÂ×Üƽ³£ÊÂ, ·³ÄÕÐĽÔÌ°ÓûÐÄ-----
'*------------------------------------
Option Compare Database
Option Explicit
Const pProgClsCode = "ord"
Dim y As Integer
'
'
Sub ExpandSubTree(rsvalue As String, NodeA As Node)
'On Error GoTo ETBE_Err
Dim rsChild As Recordset, rsChild1 As Recordset, rsTempBe As Recordset, stInv As String, Summy As Variant, No As String
Dim Qty As Double, ln As Integer
Dim n As Node, N1 As Node
Dim strSql As String
Dim strCtlName As String
Set rsChild = New ADODB.Recordset
Set rsChild1 = New ADODB.Recordset
strSql = "select progcls1code,progcls1name from tblSysProgCls1 where progclscode='ord' order by seqno;"
rsChild.Open strSql, CurrentProject.Connection, adOpenStatic, adLockReadOnly
If rsChild.RecordCount = 0 Then
Exit Sub
Else
'ln = dlen(rsChild.RecordCount)
rsChild.MoveFirst
While Not rsChild.EOF
Set n = Trv.Nodes.Add(NodeA.Index, tvwChild, "C" & rsChild("progcls1code").Value, rsChild("progcls1name").Value, 1)
n.Expanded = True 'True
If rsChild1.State = 1 Then rsChild1.Close
strSql = "select progcls2code,progcls2name from tblSysProgCls2 where progcls1code='" & rsChild("progcls1code") & "' order by seqno;"
rsChild1.Open strSql, CurrentProject.Connection, adOpenStatic, adLockReadOnly
While Not rsChild1.EOF
Set N1 = Trv.Nodes.Add(n.Index, tvwChild, "S" & rsChild1("progcls2code").Value, rsChild1("progcls2name").Value, 2)
N1.Expanded = True 'True
rsChild1.MoveNext
Wend
'ExpandSubTree rsChild("part_id").Value, N
rsChild.MoveNext
Wend
End If
Exit Sub
ETBE_Err:
' mis_Alert "Error In Explode2TempBomExtendNew......" & Error$
Exit Sub
End Sub
<DIV>
Private Sub Form_Load() |
|