Consulting

Results 1 to 2 of 2

Thread: Access form VBA ComboBox click event

  1. #1

    Access form VBA ComboBox click event

    I have an Access form with comboboxes, textboxes and buttons. In the comboboxes I have the LimitToList property set to false, because in some situations I need to add some texto, and because of that, I need to validate the content of the comboxes and I'm using the OnClick event. However if I change the text in the combobox and the click on the "Exit" or "New" button, it fires the OnClick event. I would like to know if it's possible to the OnClick event only fires when I really click on a line of the combobox or press the Enter key, instead of firing when I click other button after changing the text of the combobox.
    Thanks

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Are your combos based on lists or Tables?
    They should really be based on tables so that users (with access to the data) can add or edit the data, rather than having to add them to the lists themselves or rely on you doing it, although later versions of Access have made this much easier to change the lists.

    Have you looked at using the After Update or On Enter events instead of the on click?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •