Results 1 to 4 of 4
  1. #1
    Bkper087 is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    May 2014
    Posts
    81

    What property criteria refreshes form without clicking out of current control box?


    Using VBA, I want the form to refresh once a new selection is made in a combo box without having to click outside of the box first. What is the right property to place this under? Currently I'm using the After Update option, but again, it doesn't change until after i click outside the box. Small detail, but I think it will make for a much better user experience.

  2. #2
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,741
    What's the complete VBA code in the AfterUpdate event?

  3. #3
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,938
    the event you would normally use is the change event. However this will trigger for every change. i.e. either selecting a change from the dropdown or every time you type a character in the combo.

    Another alternative is to use the mouse up event which will eliminate the use of the keyboard (but might be confusing to the user), however it is typically triggered twice, once when the arrow box is clicked and once when a selection is made, so you need code to prevent the refresh happening when not required

    However in either event, since the combo has not been updated, the combo will not have taken on the value - you would need to reference the combo's .text property if your refresh makes use of the combo

    So agree with davegri, need understand what the refresh actually means by seeing the afterupdate code

  4. #4
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    I can't agree with that. The AfterUpdate event fires after a selection is made - even if you pick the same value that is already been selected. At least it does for me.
    Suggest you put msgbox "After update fired" as the first line of code, save, switch back to form view and make a selection. If there's no message, then the control might be corrupt. Or, you are using the AfterUpdate event for the form itself. That's why posting the code might be important to getting a resolution.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 7
    Last Post: 03-09-2018, 11:11 PM
  2. Replies: 15
    Last Post: 05-12-2016, 02:27 PM
  3. Replies: 2
    Last Post: 09-15-2015, 03:08 AM
  4. Replies: 2
    Last Post: 11-18-2014, 09:12 AM
  5. Replies: 2
    Last Post: 09-25-2014, 11:24 AM

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