AutoRepeat Property

Microsoft Access Visual Basic

expression.AutoRepeat

expression    Required. An expression that returns one of the objects in the Applies To list.

Setting

The AutoRepeat property uses the following settings.

Setting Visual Basic Description
Yes True The macro or event procedure in the Click event runs repeatedly while the command button remains pressed in.
No False (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 seconds after it first runs. Subsequent repeats occur either 0.25 seconds 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.