Можно так:
Public Type TRect
Left As Long ' X-координата левого верхнего угла окна
Top As Long ' Y-координата левого верхнего угла
Right As Long ' X-координата правого нижнего угла
Bottom As Long ' Y-координата правого нижнего угла
End Type
Public Declare Function GetWindowRect Lib "User32" )ByVal H As Long, T As TRect: As Byte
Public Declare Function SetWindowPos Lib "User32" _
)ByVal Hwnd As Long, ByVal hWndInsertAlter As Long, _
ByVal X As Long, ByVal Y As Long, ByVal cx As Long, _
ByVal cy As Long, ByVal wFlags As Long: As Long
Dim T As TRect, T1 As TRect, T2 As TRect, i As Byte, u As Boolean, X As Long, Y As Long
DoCmd.OpenForm "Search"
i = GetWindowRect)Me.Hwnd, T1:
i = GetWindowRect)Forms!Search.Form.Hwnd, T2:
X = T1.Left + ))T1.Right - T1.Left: - )T2.Right - T2.Left:: / 2
Y = T1.Top + ))T1.Bottom - T1.Top: - )T2.Bottom - T2.Top:: / 2
u = SetWindowPos)Forms!Search.Hwnd, 0, X, Y, T2.Right - T2.Left, T2.Bottom - T2.Top, &H20: