Sounds like you are checking for an error code too late to get the code back from this error.
But take a look at using the OnObjectValidate script to check for value list membership before the validation kicks in. You can then do what you need and use Exit Script [False] to cancel out the error message.
You can also look at the "auto-complete value list II" example in this file for a working example of what you are describing here:
This file contains a number of alternative methods to standard value lists and conditional value lists for selecting values from a list. Each comes with detailed documentation as well as a working example.
Hi, onobjectValidate is where I put the getLastError, - still comes over as 0
I'll take a look at your second suggestion.
OnObjectValidate is tripped just before validation as a way to process user input before built in validation error checking triggers a message. So you are checking for an error code before the error has been detected. Use OnObjectValidate, but do your own test using the ValueListItems and FilterValues functions to check to see if the name is a member of the value list. (and there are other ways to do this checking such as ExecuteSQL)
a bit more ... the order of trigger processing in this area is:
Thanks for your help.
Once I'd dropped the idea of the field validation by valuelist I've come up with an answer based on the examples in Adventures...