Imported null values read as zero-length strings
Imported null values read as zero-length strings
(OP)
Hi. I'm trying to append records from an imported table to an existing table in Access 97, but I'm getting the "validation rule violation" error message. If I change the "allow zero-length strings" property to "yes" for the fields to which I'm appending, I don't get the error message and the append is successful.
As the properties on the imported table are set to the same default properties as the "appendee" table, Access must be reading imported null values as zero-length strings. This could be a rather large pain in the tush when doing regular imports/appends...
Anyone know why Access behaves this way? Is there a solution?
Thanks!!!
As the properties on the imported table are set to the same default properties as the "appendee" table, Access must be reading imported null values as zero-length strings. This could be a rather large pain in the tush when doing regular imports/appends...
Anyone know why Access behaves this way? Is there a solution?
Thanks!!!
RE: Imported null values read as zero-length strings
you obviously have a validation rule that says these fields are required, therefore the source table has empty fields in some or all of its fields that you are adding.
is the required setting needed at the table level or could you put this into the form used for user entry?
if not you could add an iif statement to the query to add some flag if the source field is null like
iif (isnull(thisfield),"Help",thisfield)
and have a routeen after the import or before the import depends on what fits your requirements, to force the user to enter the correct data, if this isn't an issue change "help" for " " a single space.
HTH
Robert
RE: Imported null values read as zero-length strings