Really Not-in-List

J

jonefer

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?
 
A

Albert D. Kallal

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....
 
J

Jonathan Parminter

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Rename Message Box 3
text box select text 2
Combo box 0
Yes/No field custom format text color 1
Outlook 2007 Font 0
Combo Box Trouble 3
Combo Box selections 0
Printing from the RGB to CMYK 9

Top