access form body centered

Private Sub Form_Load()
DoCmd.Echo False

Dim x, y As Integer
DoCmd.Maximize
x = Me.WindowWidth
y = Me.WindowHeight
DoCmd.Restore
DoCmd.Echo True
Move (x - Me.WindowWidth) / 2.5, (y - Me.WindowHeight) / 3
End Sub

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325117423&siteId=291194637