I'm having an issue inserting data into an Access table in a field that has a validation rule on it. The field is storing a part number in the format of "xxxx-yyyyyy". There is a validation rule of [Like "????-??????"] on the part field.
When I try to insert a part number of "1234-567890" programatically into that field I get an error "System.Data.OleDb.OleDbException: 'One or more values are prohibited by the validation rule 'Like "????-??????"' set for 'table1.part'. Enter a value that the expression for this field can accept.'
If I remove the validation from the field I can then do the insert, but I need to keep the validation rule in place because sometimes the table is updated manually. Does anyone have any idea how I can do the insert with the validation rule in place? Any help would be greatly appreciated. Thanks...
When I try to insert a part number of "1234-567890" programatically into that field I get an error "System.Data.OleDb.OleDbException: 'One or more values are prohibited by the validation rule 'Like "????-??????"' set for 'table1.part'. Enter a value that the expression for this field can accept.'
If I remove the validation from the field I can then do the insert, but I need to keep the validation rule in place because sometimes the table is updated manually. Does anyone have any idea how I can do the insert with the validation rule in place? Any help would be greatly appreciated. Thanks...