Home  Fees/Services  Access Examples  Tutorials  Access Download  Articles  Search  Contact  Privacy  Links
Custom Database Design Consultants
 
Access Programming Examples
 
Access Example Downloads
Access Form Events Access Event Coding Examples
Form Event Programming
Access VBA Events

 Database Tutorials > Form Event Tutorials > Double Click Event

                               

After Insert Event
After Update Event
Before Update Event
On Change Event
On Close Example
On Current Event
On DblClick Event
On Error Event
On Exit Event Help
VBA Timer Event
Undo Event Method


DblClick Event Example

VBA Form On DblClick Event Examples - Code Samples

On DblClick event occurs in VBA when the user presses and releases the left mouse button twice within the double-click time limit of the computer.

Double Click Visual Basic Example:

We often use the DblClick event to display detail records attached to a master record.  Here we display the F_Order_Details from when the user clicks on a record in the main order details form:

Private Sub Order_Number_DblClick(Cancel As Integer)
    DoCmd.OpenForm "F_Order_Details", , , _
    "Order_ID = Me.Order_ID"
End Sub

The event order for clickable controls other than buttons is:

MouseDown → MouseUp → Click → DblClick

Programming for the double click event is the same as programming for the single click event.  Note that novice computer users have difficulty double clicking.  Others always double click on items since it is the standard way of activating objects in the Windows environment.

When you have objects with only a single click event you might want to consider calling the single click event from the double click event to help reduce user frustration.

Contact Information

Event Procedures in MS Access
Microsoft Access 2003 2000 2002(XP) 97 All Windows Versions