AutoRepeat Property

AutoRepeat Property

See Also                  Applies To

You can use the AutoRepeat property to specify whether an event procedure or macro runs repeatedly while a command button on a form remains pressed in.

Setting

The AutoRepeat property uses the following settings.

Setting Visual Basic Description
Yes True (–1) The macro or event procedure in the Click event runs repeatedly while the command button remains pressed in.
No False (0) (Default) The macro or event procedure runs once.

You can set this property by using the command button's property sheet, a macro, or Visual Basic.

Remarks

The initial repeat of the event procedure or macro occurs 0.5 second after it first runs. Subsequent repeats occur either 0.25 second apart or the duration of the event procedure or macro, whichever is longer.

If the code attached to the command button causes the current record to change, the AutoRepeat property has no effect.

If the code attached to the command button causes changes to another control on a form, use the DoEvents function to ensure proper screen updating.