I have an Access front end with linked SQL tables. when I try to run the action, I get this error: Field 'tbl_XXX_.PO# ' can't be a zero-length string? What should I do? On the table itself where it gets the data from is blank, no value?
The basic problem is that you're trying to put a '' (i.e. a string with nothing in it), into a field on SQL Server that won't allow it. You can either change the value to a null (assuming the field will take it). In SQL you would do it thus:
NULLIF(fieldvalue,'')
which returns null if the fieldvalue='' or else the fieldvalue.
Otherwise you could try and default it to a single space thus:
isnull(Nullif(fieldvalue,''),' ')
Note the space between the second set of quotes. This basically says: If it's '', set it to null, then if it's null set it to ' '.
Let me know if this don't help.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.