I have a button on a form in ms-access where I have both a "On Click" and "on Dbl Click" events filled. I am running into the problem that the single click event works but the double click will not unless on the second click, I keep holding it down and drag the mouse off the button before I release it. What this button does is it fills a textbox with certain text depending on the 2 different clicks. How is it I can fix this double click issue? The code for the buttons is below. Note that Task_ID_AfterUpdate() also fills in text fields according to what the Me.Task_ID is by looking it up in a Query.
'single click
Private Sub getBtn_Click()
btnUpdateHelper (1162)
End Sub
'double click
Private Sub getBtn_DblClick(cancel As Integer)
btnUpdateHelper (1449)
End Sub
Private Sub btnUpdateHelper(Task As Variant)
'helper method for buttons, only pass task id
'Me.Task_ID is a textfield
Me.Task_ID = Task
Task_ID_AfterUpdate
End Sub
Private Sub Task_ID_AfterUpdate()
Dim taskIdNum As String
taskIdNum = Me.Task_ID
'updates all fields to display the selected task
Me.Area = DLookup("Area", "Query", "TaskID=" & taskIdNum)
Me.Activity = DLookup("Activity", "Query", "TaskID=" & taskIdNum)
Me.Description = DLookup("Description", "Query", "TaskID=" & taskIdNum)
Me.Comments = DLookup("Comments", "Query", "TaskID=" & taskIdNum)
Me.Task_Group = DLookup("[Task Group]", "Query", "TaskID=" & taskIdNum)
Me.Mul = DLookup("Mul", "Query", "TaskID=" & taskIdNum)
Me.Time = DLookup("Time", "Query", "TaskID=" & taskIdNum)
End Sub
_MouseDownevent to catch these.