Access List Box - single click event firing only on double-click

Posted on 2011-10-22
Last Modified: 2012-08-13
OK - hopefully this is easy - I have code in the Click (not double-click) event of a list box in Access (2007). It is only firing when user double-clicks an item. This causes confusion, since if you click once, you select a different item, and then the displayed information is out of sync. Thanks!
Question by:terpsichore
    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    Not quite seeing how that could happen  ... Can you post the code you have in the click event?

    LVL 11

    Expert Comment

    by:Swapnil Nirmal
    please post sample access with code
    LVL 10

    Expert Comment


    Have you ever had any code behind the double-click event? I have sometimes had trouble with Access not 'registering' my code changes if I've made changes in the module rather than via the events list of the properties box.

    But we still need to see some code!

    LVL 33

    Expert Comment

    by:Mike Eghtebas
    First thing before any code add the following lines in there respective events and test them to see if click event works for the list box:

    MsgBox "You clciked."

    MsgBox "You dbl-clicked"

    Author Comment

    I am not at my laptop - but wanted to reply. As a matter of fact this code was until recently in the double click event and I moved it to the click event...
    LVL 10

    Accepted Solution

    Aha - I thought that was likely. Can I suggest you copy the code out, then delete the click and double-click events from code, and go to the properties window for the listbox. Then double-click  'on click' in the event tab, select event procedure and add the code back in there.

    I hope that might help...

    Author Closing Comment

    Your initial comment led me to suspect there was some corruption - I decompiled and recompiled, and the problem (along with a few other small things) was solved. Thanks to you and the other respondents for great ideas.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    In the previous article, Using a Critera Form to Filter Records (, the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
    Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
    Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
    With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now