MustangPriMe
IS-IT--Management
I've been having problems with text boxes bound to a SQL field which doesn't allow nulls, and so far I've not found an answer. Hopefully someone will have a bright idea!
Basically, when using the form I've created, leaving the text box empty is fine as the default value is set to a zero length string (""). Entering text into the box is also fine, or course. The problem comes when deleting the contents of the text box once something has already been typed. Instead of going back to a zero length string, Access seems to treat it as a NULL, and when I then try to move to another field or some other action I get an error message "Non-nullable column cannot be updated to Null".
I've tried testing for Nulls (with the intention of converting to zero-length) using the Before_Update event, but the error message seems to precede the event firing.
Does anyone know of a useful way round this little problem?
Thanks,
Paul Martins
Basically, when using the form I've created, leaving the text box empty is fine as the default value is set to a zero length string (""). Entering text into the box is also fine, or course. The problem comes when deleting the contents of the text box once something has already been typed. Instead of going back to a zero length string, Access seems to treat it as a NULL, and when I then try to move to another field or some other action I get an error message "Non-nullable column cannot be updated to Null".
I've tried testing for Nulls (with the intention of converting to zero-length) using the Before_Update event, but the error message seems to precede the event firing.
Does anyone know of a useful way round this little problem?
Thanks,
Paul Martins