Really Not-in-List

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've successfully written a routine that automatically updates my combo box
if the user decides to add a new value.

However....
Let's say I have a name in the combo box list: "Blue Hawaii"

and I want to add "Blue" ... Just "Blue" and not "Blue Hawaii" (I can make
the not-in-list event come up by deleting Hawaii)

The problem is, that even though the new value "Blue" is now in the table,
the combo box still accepts "Blue Hawaii" instead of blue.

How can I control this better?
 
I believe if you take the sql for the combo box and set a sort on the
field..then he Blue will come up first....
 
Jonefer said:
-----Original Message-----
I've successfully written a routine that automatically updates my combo box
if the user decides to add a new value.

However....
Let's say I have a name in the combo box list: "Blue Hawaii"

and I want to add "Blue" ... Just "Blue" and not "Blue Hawaii" (I can make
the not-in-list event come up by deleting Hawaii)

The problem is, that even though the new value "Blue" is now in the table,
the combo box still accepts "Blue Hawaii" instead of blue.

How can I control this better?

Hi Jonefer, the combobox is only ensuring that the entered
value is in the list. What you are requiring is data
validation. That is, a check to ensure that the value is
the best/appropriate value for the record.

You can run validation checks using the .BeforeUpdate()
events.

Luck
Jonathan
 
Back
Top