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