Double click event

  • Thread starter Thread starter JimS
  • Start date Start date
J

JimS

Is there an event for when the user double clicks on the row marker for a row
in a continuous form? Some way for me to keep from forcing him to click a
command button every time he selects sometihing....
 
I would like to know that too. But if it doesn't exist, try

Possibly the On Current event of the form. It fires anytime you move the
focus to a new record which happens when you click the record select tab
(row marker) but that will fire with a single click. You might also
consider trapping the double click for the first control shown on that form.
 
JimS said:
Is there an event for when the user double clicks on the row marker for a
row
in a continuous form? Some way for me to keep from forcing him to click a
command button every time he selects sometihing....


The form's DblClick event.
 
JimS said:
Is there an event for when the user double clicks on the row marker for a
row
in a continuous form? Some way for me to keep from forcing him to click a
command button every time he selects sometihing....

The record indicator doesn't provide any events, but each control on the
form can.

Create a function in the form's module, something like:

Private Function MyFunction()
'click the command button by calling its onclick procedure
MyButton_Click
End Function

Then open the form in design view and select all the displayed controls.
Paste the following into the dblclick event:

=MyFunction()

(the names all need changing to something sensible, of course)
 
Stuart McCall said:
The record indicator doesn't provide any events, but each control on the
form can.

Yes, it does. The Click and DblClick events of the *form* fire when its
record selector is clicked or double-clicked. Since those events don't
otherwise fire for the form, you can assume that the firing of the form's
Click or DblClick event is due to an action made on its record selector.
 
Dirk Goldgar said:
Yes, it does. The Click and DblClick events of the *form* fire when its
record selector is clicked or double-clicked. Since those events don't
otherwise fire for the form, you can assume that the firing of the form's
Click or DblClick event is due to an action made on its record selector.

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)

Unless the form is viewed in datasheet mode, in which case a double click on
a column header also fires the form's event.
 
Stuart McCall said:
Unless the form is viewed in datasheet mode, in which case a double click
on a column header also fires the form's event.


Yes, that's true -- I forgot about that. So if you want to use this
technique, you must set the form's AllowDatasheetView property to No.
 
Back
Top