刚从鬼佬(老外)那儿讨来的答案:
答案一:
设置成对按钮,用 Visible 属性来切换。
答案二:(作者为 Ken Reay )
新建窗体,再克隆按钮过去。(真是服了!!!)
Public Sub moveit()
Dim frm As Form, ctlNew As Control, btn As CommandButton, btnNew As CommandButton
Dim strName As String
' Create new form and get pointer to it.
DoCmd.OpenForm "Form1", acDesign
Set frm = Forms!Form1
Set btn = frm!Command0
strName = btn.Name
DeleteControl frm.Name, btn.Name
Set btnNew = CreateControl(frm.Name, acCommandButton, acHeader, "", , 1, 1, 500, 500)
btnNew.Name = strName
' Size control.
btnNew.SizeToFit
End Sub
[此贴子已经被MsAccess于2002-8-30 16:43:58编辑过]
|