Results 1 to 3 of 3
  1. #1
    Mike79 is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    18

    Basic ComboBox Question - default setting

    Hi,



    I've found it fairly straight forward to set a default on a combobox. But the way I am doing it (either in the properties with ="DefaultText" or with code, Me.cbobox= "DefaultText"), both these options simply have the default text highlighted, it doesn't run any event. I have an on click event which does what I want. Is there a way that when I select a default value, it runs the onclick event? Right now I just use formload to set the cbobox value, then essentially copy and pasted the on click event and run that as well. I'm just wondering if I am making it overly complicated and there is a much easier way.

    Thanks.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    VB settings of objects do not trigger Events.
    you must do it

    cboBox = "defaultVal"
    cboBox_AfterUpdate

  3. #3
    Mike79 is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    18
    Thanks. What's the difference between after update and on click?

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

Similar Threads

  1. Replies: 8
    Last Post: 12-29-2017, 04:19 PM
  2. Replies: 2
    Last Post: 06-25-2015, 11:42 AM
  3. Setting default
    By Thompyt in forum Programming
    Replies: 10
    Last Post: 11-10-2014, 11:49 AM
  4. Combobox setting other combobox values problem
    By maxmaggot in forum Programming
    Replies: 8
    Last Post: 06-30-2013, 07:18 AM
  5. Replies: 3
    Last Post: 06-14-2013, 01:50 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