M
Michael E. Hill
I have a Command Button on a form that should run a Public VBA Subroutine
only once, unfortunately the subroutine runs three times for every one click
of the button. Setting AutoRepeat to YES or NO makes no difference. This
occurs on two different computers running Access 2000 and a third computer
running Access 2002.
Here's a simple example in a new, otherwise empty, database.
1 form, named frmTestForm
frmTestForm contains 1 Command Button, named cmdTest
cmdTest On Click Event set to =[TestProcedure]
The entire contents of the VBA code on Form_frmTestForm (or the entire DB
for that matter) are:
Option Compare Database
Public Sub TestProcedure()
MsgBox ("Running Test Procedure")
End Sub
Clicking cmdTest on frmTestForm should obviously produce a single Message
Box, but it produces it three times!
Anyone know why? Or even better, anyone know how to fix this?
Thanks,
Michael
only once, unfortunately the subroutine runs three times for every one click
of the button. Setting AutoRepeat to YES or NO makes no difference. This
occurs on two different computers running Access 2000 and a third computer
running Access 2002.
Here's a simple example in a new, otherwise empty, database.
1 form, named frmTestForm
frmTestForm contains 1 Command Button, named cmdTest
cmdTest On Click Event set to =[TestProcedure]
The entire contents of the VBA code on Form_frmTestForm (or the entire DB
for that matter) are:
Option Compare Database
Public Sub TestProcedure()
MsgBox ("Running Test Procedure")
End Sub
Clicking cmdTest on frmTestForm should obviously produce a single Message
Box, but it produces it three times!
Anyone know why? Or even better, anyone know how to fix this?
Thanks,
Michael