Results 1 to 4 of 4
  1. #1
    Salty Mariner is offline Intermediate
    Windows 11 Access 2021
    Join Date
    Dec 2023
    Location
    Corpus Christi, TX
    Posts
    69

    Listbox AfterUpdate event interfering with listbox DoubleClick event.

    I have an interesting problem. I have a listbox in which I have an AfterUpdate event firing that changes the value of a textbox and a label caption property. After the listbox item is selected I want to run some code on a DoubleClick event of the listbox to open a folderbrowser save the path and write that path to a recordset. Allof this seems as though it should be pretty straight forward. The listbox DoubleClick event however won't fire unless I either click into empty space on the listbox or I disable the AfterUpdate Event.

    Any idea of what might be going on here and possible workarounds? I would think that the two events should be entirely separate entities but apparently I am mistaken. I guess I could dispense with the DoubleClick and use a button if I had to but I'd rather try to figure this out.

  2. #2
    Salty Mariner is offline Intermediate
    Windows 11 Access 2021
    Join Date
    Dec 2023
    Location
    Corpus Christi, TX
    Posts
    69
    Well I fixed my issue by breaking up one subroutine into 2 smaller ones. As I was building the code and adding more actions I had one subroutine that was accomplishing several different things and I thought I could fire them off all together (I was wrong). Breaking them up then firing and closing them separately seemed to solve whatever conflict issue I was having.

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    The use of the ClickEvent for a Control prevents the use of the DoubleClick event...Access will only 'register,' if you will, the first click.

    In order to have an AfterUpdate, the ClickEvent must have been fired for the Listbox Control, hence rending the DoubleClick event powerless.

    Glad your work around solved your problem!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    Salty Mariner is offline Intermediate
    Windows 11 Access 2021
    Join Date
    Dec 2023
    Location
    Corpus Christi, TX
    Posts
    69
    Quote Originally Posted by Missinglinq View Post
    The use of the ClickEvent for a Control prevents the use of the DoubleClick event...Access will only 'register,' if you will, the first click.

    In order to have an AfterUpdate, the ClickEvent must have been fired for the Listbox Control, hence rending the DoubleClick event powerless.

    Glad your work around solved your problem!

    Linq ;0)>
    Yeah I sort figured all of that out...the hard way. Oh well, it was a good learning experience that I won't forget.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 12-03-2020, 05:11 PM
  2. Replies: 2
    Last Post: 10-09-2016, 05:41 PM
  3. Replies: 13
    Last Post: 09-10-2015, 03:37 PM
  4. Replies: 4
    Last Post: 06-24-2013, 07:34 AM
  5. Cancel Selection Event for ListBox
    By is49460 in forum Forms
    Replies: 2
    Last Post: 08-04-2010, 05:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums