J
J Holtendehouzer
I have a combobox that I'm trying to build a shortcut into--when the user
types in a two-letter combination, the combobox selects the long name
corresponding to that combination (e.g., typing "GH" and leaving the field
should automatically select "Green Hills Drive" within the combobox.
I'm having trouble, though. I initially put my code in the NotInList event.
I simply look for the two-letter code in the source table (where the
shortcut and the long name are both stored), then set the value of the
combobox to the key I find there. I handle the error if the user enters a
shortcut that doesn't exist.
My problem is that after all of that, the code works, but the combobox
automatically drops down its list. Should I put the code in a different
event?
I tried BeforeUpdate, which made more sense, but it wouldn't let me modify
the value of the combobox from that event (why is that, by the way?).
Anywho, any help would be appreciated!
Joe
types in a two-letter combination, the combobox selects the long name
corresponding to that combination (e.g., typing "GH" and leaving the field
should automatically select "Green Hills Drive" within the combobox.
I'm having trouble, though. I initially put my code in the NotInList event.
I simply look for the two-letter code in the source table (where the
shortcut and the long name are both stored), then set the value of the
combobox to the key I find there. I handle the error if the user enters a
shortcut that doesn't exist.
My problem is that after all of that, the code works, but the combobox
automatically drops down its list. Should I put the code in a different
event?
I tried BeforeUpdate, which made more sense, but it wouldn't let me modify
the value of the combobox from that event (why is that, by the way?).
Anywho, any help would be appreciated!
Joe