Getting 'validation rule violation' when I don't have any validation rules?

S

S Davis

Hey guys,

So all I am trying to do is append some data into a table here. Out of
13,000 records I am only allowed to append 901 of them, with the rest
saying that they violate a validation rule. Thing is, neither one of
my tables has any validation rules associated with it.

My steps to resolving this so far:
Check for validation rules on both tables - none exist that I can see
Check field length size on all fields - some were different. Changed
them to be equal, and still get the same error
Strip out accepted vs not-accepted records and try to distinguish any
differences - there must be something in there, but I can not tell at
all. To my eye, and with excel's aid, they are for all intents and
purposes of the same data type and very similar

Unfortunately I can not post up any of the information causing
problems, and simply making up.



Alright, I've done a bunch more analysis and I cant believe this didnt
jump out at me at first, but it seems that if any of the records has a
Null value in any of the fields, it is rejected. So, how do I go about
appending this information even with the Null valies?
 
J

Jeff Boyce

If your underlying table definition includes Required fields, you can't put
Nulls in them.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
M

Marshall Barton

S said:
So all I am trying to do is append some data into a table here. Out of
13,000 records I am only allowed to append 901 of them, with the rest
saying that they violate a validation rule. Thing is, neither one of
my tables has any validation rules associated with it.

My steps to resolving this so far:
Check for validation rules on both tables - none exist that I can see
Check field length size on all fields - some were different. Changed
them to be equal, and still get the same error
Strip out accepted vs not-accepted records and try to distinguish any
differences - there must be something in there, but I can not tell at
all. To my eye, and with excel's aid, they are for all intents and
purposes of the same data type and very similar

Unfortunately I can not post up any of the information causing
problems, and simply making up.



Alright, I've done a bunch more analysis and I cant believe this didnt
jump out at me at first, but it seems that if any of the records has a
Null value in any of the fields, it is rejected. So, how do I go about
appending this information even with the Null valies?


Set those field's Required property to No. I'm pretty sure
that the Required property really is an internal validation
rule set to: Is Not Null

There are some(?) situations where an index will also reject
Null values.
 

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

Top