Animate Event Example for Access 2.0

This example shows how the Animate event can be used to toggle the use of a button to start and stop the animation.

Sub Lead1_Animate (bEnable As Integer)
  If bEnable = True Then
    Button1.Caption = "Stop Animation"
  Else
    Button1.Caption = "Start Animation"
  End If
End Sub

Sub Button1_Click()
   If Me![LEAD1].Object.AnimationEnable = True Then
     Me![LEAD1].Object.AnimationEnable = False
   Else
     Me![LEAD1].Object.AnimationEnable = True
   End If
End Sub