Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does a user insert a null in MS Access?

Tags:

null

ms-access

MS Access appears to support nulls in code, but I can't for the life of me figure out how to enter a null directly in a table. This is maddening because once a field has had a figure entered in it, it can never be deleted/set to null. Normally, allowing zero length strings would take care of this, but Access treats the XML export of a null and a zero length string differently. A null eliminates the associated XML tag and a zero length string sends an empty tag.

like image 731
anopres Avatar asked Feb 04 '23 12:02

anopres


2 Answers

Does setting the "Allow zero length string" option in the table definition help? It may force an empty string to be interpreted as NULL.

like image 159
Chris Smith Avatar answered Feb 19 '23 19:02

Chris Smith


Are you talking about needing to do it in Datasheet view? If you needed to do it in an update query, you can do it like this:

UPDATE test SET test.test = Null;
like image 25
Patrick Harrington Avatar answered Feb 19 '23 18:02

Patrick Harrington