I am using Access 2003 and SQL Server 2005. An Access form is bound to a linked table, which is linked to a SQL Server table. A text field in the text does not allow null value but accept empty string when nothing is entered, it also defaults to an empty string.
The form works most of time, but a key issue there is that the textbox in Access returns null value when nothing is entered. Every time when a user deletes the text from the textbox, I got an error, telling me that the null value is not allowed by that field. The error is from the database engine, not an VBA error. The error occurs even before the "textbox_beforeupdate" event. I tried several version of codes manipulating the key events and mouse events, but could not get a good solution because there are so many way to delete the text, like backspace, highlight and cut, highlight and backspace, etc.
I wonder whether I missed anything or there is a simple solution to this?
The form works most of time, but a key issue there is that the textbox in Access returns null value when nothing is entered. Every time when a user deletes the text from the textbox, I got an error, telling me that the null value is not allowed by that field. The error is from the database engine, not an VBA error. The error occurs even before the "textbox_beforeupdate" event. I tried several version of codes manipulating the key events and mouse events, but could not get a good solution because there are so many way to delete the text, like backspace, highlight and cut, highlight and backspace, etc.
I wonder whether I missed anything or there is a simple solution to this?