Re: NotInList event of a ComboBox



Well, I kind of got it working using by counting the number of times the notInList event fires. Big ugly though...

David C. Holley wrote:
Of course it'd be TO easy for MS to have a .Transform method available! thpppt!

Marshall Barton wrote:

David C. Holley wrote:


Doesn't work. I tried explicity setting newData to a value that already exists in the list. Access ignores the value that I explicity set newData to and searches for the original value. Basically, I need to get Access to ignore the original value and select another.




David, this is a very tricky thing to do.  Any time you save
a value to the combo box's table that is different from the
value the user entered, you run into this issue.

I don't remember the exact details, but it involves your
NotInList procedure setting the combo box's Text property.
This in turn will trigger another NotInList event so the
event procedure will be processing two different values
simultaneously.  You need to use a Static flag variable so
the procedure can determine what to do for the different
values.

I don't have the time to search google for a code sample
now, but maybe you can find one before I can get to it.

.



Relevant Pages

  • Re: NotInList event of a ComboBox
    ... I tried explicity setting newData to a value that already ... David, this is a very tricky thing to do. ... NotInList procedure setting the combo box's Text property. ... This in turn will trigger another NotInList event so the ...
    (microsoft.public.access.modulesdaovba)
  • Re: NotInList event of a ComboBox
    ... Marshall Barton wrote: ... NotInList procedure setting the combo box's Text property. ... This in turn will trigger another NotInList event so the ...
    (microsoft.public.access.modulesdaovba)