Hi Rebecca,
If you still want to have your controls pasted at the top of section, you
might want to try the following:
- create the following function in a separate module:
Function fPasteSelectedControlsTop()
Dim ctl As Control
On Error Resume Next
If Screen.ActiveForm.CurrentView <> 0 Then Exit Function
DoCmd.RunCommand acCmdPaste
For Each ctl In Screen.ActiveForm.Controls
If ctl.InSelection And ctl.ControlType <> acLabel Then
DoCmd.SetProperty ctl.Name, acPropertyTop, 0
If ctl.Controls(0).Name <> "" Then DoCmd.SetProperty ctl.Controls
(0).Name, acPropertyTop, 0
Exit For
End If
Next
End Function
- create AutoKeys macros (if you do not have one), and call the above
function from it:
^{F5} RunCode fPasteSelectedControlsTop
(you can change Ctrl+F5 shortcut to whatever you prefer)
Now go to your form's design view and copy control; then press Ctrl+F5 to
paste it together with its associated label (if any) at the top of section.
You might want to modify the code (just comment or delete Exit For line) to
be able to paste several control-label pairs at a time, but they will be
pasted one over another at the top of section.
(Actually I guess that is the reason why MS decided to paste controls to some
free space..)
So my advice is to copy/paste controls one by one.
Hope this helps..