As far as I am aware, there isn't an event that is fired when (and only
when) a form is moved. However, you could use the Timer event of the second
form to check the position of the first form ...
Private mlngOtherFormTop As Long
Private mlngOtherFormLeft As Long
Private Sub Form_Open(Cancel As Integer)
If CurrentProject.AllForms("Form3").IsLoaded Then
mlngOtherFormTop = Forms("Form3").WindowTop
mlngOtherFormLeft = Forms("Form3").WindowLeft
End If
Me.TimerInterval = 250
End Sub
Private Sub Form_Timer()
Dim lngOtherFormTop As Long
Dim lngOtherFormLeft As Long
If CurrentProject.AllForms("Form3").IsLoaded Then
lngOtherFormTop = Forms("Form3").WindowTop
lngOtherFormLeft = Forms("Form3").WindowLeft
If lngOtherFormTop <> mlngOtherFormTop Or lngOtherFormLeft <>
mlngOtherFormLeft Then
mlngOtherFormTop = lngOtherFormTop
mlngOtherFormLeft = lngOtherFormLeft
Me.Move mlngOtherFormLeft + 1000, mlngOtherFormTop + 1000
End If
End If
End Sub